While installing CairoSVG and WeazyPrint on a Dockerfile I keep getting this TypeError:
Collecting WeasyPrint
Downloading WeasyPrint-0.34.tar.gz (391kB)
Collecting cairosvg
Downloading CairoSVG-2.0.1.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-pSKp0y/cairosvg/setup.py", line 24, in <module>
with open(init_path, 'r', encoding='utf-8') as fd:
TypeError: 'encoding' is an invalid keyword argument for this function
After some research, I Found that CairoSVG-2.x is for Python 3+. Problem was solved when I installed 1.x version:
pip install cairosvg==1.0.22
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With