图形工具在导入时出现裂纹 [英] graph-tool crahes on import

查看:98
本文介绍了图形工具在导入时出现裂纹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Python 2.7我尝试导入图形工具:

Using Python 2.7 I try to import graph-tool:

from graph_tool.all import *

每次执行上述命令时,都会返回以下错误,并且Python崩溃.

Each time I execute the above command the following error is returned and Python crashes.

dyld:懒惰的符号绑定失败:找不到符号: __ZN5boost6python6detail11init_moduleEPKcPFvvE引用自:/usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so 预期用于:平面名称空间

dyld: lazy symbol binding failed: Symbol not found: __ZN5boost6python6detail11init_moduleEPKcPFvvE Referenced from: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so Expected in: flat namespace

dyld:找不到符号:__ ZN5boost6python6detail11init_moduleEPKcPFvvE 引用自: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so 预期用于:平面名称空间

dyld: Symbol not found: __ZN5boost6python6detail11init_moduleEPKcPFvvE Referenced from: /usr/local/lib/python2.7/site-packages/graph_tool/libgraph_tool_core.so Expected in: flat namespace

Trace/BPT陷阱:5

Trace/BPT trap: 5

我在Mac OSX 10.10上安装了带自制软件的graph-tool.有人知道如何解决此问题吗?

I installed graph-tool with homebrew on Mac OSX 10.10. Does anybody know how to fix this issue?

推荐答案

已安装Python模块,但可能未安装站点包 在您的python sys.path中,因此您将无法导入模块 此公式已安装.如果您打算使用这些模块进行开发, 请这样运行:

Python modules have been installed but the site-packages may not be in your Python sys.path, so you will not be able to import the modules this formula installed. If you plan to develop with these modules, please run like this:

mkdir -p /Users/myname/Library/Python/2.7/lib/python/site-packages

echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/myname/Library/Python/2.7/lib/python/site-packages/homebrew.pth

在我的情况下,这是自制网站包,但可能不是你的

In my case it's the homebrew site-packages, but may not yours

这篇关于图形工具在导入时出现裂纹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆