2

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?

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
cs0815
  • 16,751
  • 45
  • 136
  • 299

1 Answers1

5

Using

import cairosvg

instead of

import CairoSVG

should fix your problem.

Source : http://cairosvg.org/

Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
Constantin Guidon
  • 1,892
  • 16
  • 21