问题描述
为什么这么难?似乎是一个永远存在的问题。解决起来不清楚。
-
在多个github
由于我对os环境的了解不足,因此感觉这将花费更长的时间。
有人可以救我吗,我只想测试
igraph.plot
更新
brew install py2cairo
以某种方式帮助终端上的PYTOHNPATH找出了库的位置,但仍然无法在Eclipse中找到它。
当然是手动添加在首选项上。为什么它不能导入?
解决方案导入cairocffi就像开罗
一样。
除了手动重新安装之外,还必须安装
cairocffi
。
(我进行了brew安装,Mac仍然接受了安装)
如果要使用
igraph
,无需麻烦地显式导入这些库中的任何一个。
超级用户上的相关线程。发布了一些有用的参考资料,可能会遇到一些。
Why is it so effin' hard? Seems to be an ever-present issue..solved unclearly.
Searched on multiple github pages, advised to use
import cairocffi as cairo
instead, not working for me.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?
解决方案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.
这篇关于没有名为cairo的模块-Mac的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!