2017-09-03 52 views
1

我有这样的代码:PyCharm ModuleNotFoundError

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. 

还有什么可能是错误的?

回答

4

import cairosvg代替import CairoSVG应该解决您的问题,来源:http://cairosvg.org/

+0

蟒蛇真的很挑剔模块外壳 –