PyCharm ModuleNotFoundError

时间:2017-09-03 19:14:35

标签: python pycharm

我有这段代码:

import CairoSVG 

但我明白了:

"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

我跟着this并且明确安装了CairoSVG包。我也做了:

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

还有什么可能是错的?

1 个答案:

答案 0 :(得分:4)

import cairosvg而非import CairoSVG应解决您的问题,来源:http://cairosvg.org/