IOError: cannot open resource

怎甘沉沦 提交于 2019-12-06 07:18:12

You'll need to specify a font_path in your wordcloud object. Amueller, the author of the library changed a lot of things in his latest version. I updated my project according to these changes, you can check it here

Claude COULOMBE

On a Mac OS X, I've got the error:

IOError: cannot open resource

I changed the FONT_PATH in the file "wordcloud.py"

FONT_PATH = os.environ.get("FONT_PATH", "/Library/Fonts/Times New Roman.ttf")

And the error goes away.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!