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
  • 19,150
  • 23
  • 79
  • 104
cs0815
  • 15,296
  • 39
  • 125
  • 269

1 Answers1

5

Using

import cairosvg

instead of

import CairoSVG

should fix your problem.

Source : http://cairosvg.org/

Gino Mempin
  • 19,150
  • 23
  • 79
  • 104
Constantin Guidon
  • 1,828
  • 15
  • 20