【发布时间】:2011-03-13 15:15:03
【问题描述】:
我在 mac os 10.6 上安装 matplotlib 时遇到问题,所以我使用了 macports 并安装了它需要的所有依赖项,这很棒,但在它之上还有一个新的 python 版本。现在我有两个 python 版本,这让我很困扰。 matplotlib 在 macport python 上运行良好,我的其余部分使用默认 python。 将两者集成为一个的最佳解决方案是什么,以及将哪一个用作默认 python?
我尝试将所有包从我的默认 python /defaultPython/../site-packages 复制到 /opt/../site-packages。同样的事情是在 macports python 的 PYTHONPATH 上添加 /defaultPython/../site-packages。 有些确实工作得很好,但不是全部。
例如在
import scipy.sparse
我收到了这个错误
import _csr
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/sparse/sparsetools/_csr.so, 2): no suitable image found. Did find:
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/sparse/sparsetools/_csr.so: no matching architecture in universal wrapper
对此有什么想法或肮脏的解决方法吗?
非常感谢!
【问题讨论】:
标签: python matplotlib macports