Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'CairoSVG'

Tags:

python

pycharm

I have this code:

import CairoSVG 

but I get this:

"C:\Program Files\Python36\python.exe" D:/PyCharmProjects/Exyz/Bla.py
Traceback (most recent call last):
  File "D:/PyCharmProjects/xyz/Bla.py", line 1, in <module>
    import CairoSVG
ModuleNotFoundError: No module named 'CairoSVG'

Process finished with exit code 1

I followed this and the package CairoSVG is definitely installed. I also did:

Go to File > Invalidate caches/restart and click Invalidate and Restart to apply changes and restart PyCharm.

What else could be wrong?

like image 611
cs0815 Avatar asked Dec 03 '25 07:12

cs0815


1 Answers

Using

import cairosvg

instead of

import CairoSVG

should fix your problem.

Source : http://cairosvg.org/

like image 51
Constantin Guidon Avatar answered Dec 06 '25 00:12

Constantin Guidon