No module named cairo - Mac

杀马特。学长 韩版系。学妹 提交于 2019-12-24 10:47:19

问题


Why is it so effin' hard? Seems to be an ever-present issue..solved unclearly.

  1. Searched on multiple github pages, advised to use import cairocffi as cairo instead, not working for me.

  2. Some more on Stackoverflow, to add sys.path.insert(0, "//anaconda/pkgs/cairo-1.14.10-0") or something. But in fact, sys.path returns the directory anyway.

Quite sure installation done correctly as I can see under conda list.

Bad feeling this is gonna take a whole lot longer due to my little understanding of the os environment.

Can someone save me, all I want is to test igraph.plot

Update brew install py2cairo somehow helped PYTOHNPATH on the terminal to figure out the library location, but it still fails to locate it in eclipse.

Of course added on Preference manually..why can't it import?


回答1:


import cairocffi as cairo did it at the end.

Had to install cairocffi, on top of all the manual reinstall. (I had brew install, Mac still accepted the install)

If you want to plot using igraph, no need to hassle with importing any of these libraries explicitly.

Related thread on superuser. Posted some useful references some may come across.



来源:https://stackoverflow.com/questions/50657357/no-module-named-cairo-mac

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