cairosvg installed but ImportError
Asked Answered
S

1

9

I just installed cairosvg and it seems to have worked. If i try to install again it says:

$ pip install cairosvg
Requirement already satisfied(...)

But if I try to import it in python3, it delivers an ImportError:

>>>import cairosvg
Traceback(most recent call last):
(...)
ImportError: No Module named 'cairosvg'

Any ideas whats going wrong here? By the way, im trying to convert .svg files to .png ones, if there is a simpler possibility, feel free to tell me!

Stealth answered 27/8, 2016 at 9:43 Comment(0)
H
8

install with pip3:

pip3 install cairosvg
Heald answered 27/8, 2016 at 9:59 Comment(5)
@hamedbaziyad whats your os? python version?Heald
Windows 10 & Python 3.6Theis
@hamedbaziyad you should use pip command instead of pip3. if it doesn't work please check you have one python interpreter.Heald
Indeed, I have both Python 2.7 and Python 3.6Theis
@hamedbaziyad just call pip from python3 path: for example if you installed python executable in C:\python36 call pythob 3.6 pip in this way: C:\python36\scripts\pip.exe install cairosvgHeald

© 2022 - 2024 — McMap. All rights reserved.