导入matplotlib.pylab时“abort trap:6”

时间:2014-02-23 00:44:53

标签: python macos matplotlib ipython enthought

我在导入matplotlib.pylab时遇到以下问题:

In [2]: import matplotlib.pylab 
Abort trap: 6

我已经安装了EPD

MacBook-Pro-2:bin$ which python
/Library/Frameworks/EPD64.framework/Versions/Current/bin/python
MacBook-Pro-2:bin$ which ipython
/Library/Frameworks/EPD64.framework/Versions/Current/bin/ipython

当我运行它时,它照常工作:

MacBook-Pro-2:bin$ ipython
Enthought Python Distribution -- www.enthought.com

Python 2.7.3 |EPD 7.3-2 (64-bit)| (default, Apr 12 2012, 11:14:05) 
Type "copyright", "credits" or "license" for more information.

我还从github克隆了matplotlib并通过通常的python setup.py install安装了它,但我认为我的系统无法解决使用哪个matplotlib?

MacBook-Pro-2:bin$ echo $PATH
/Library/Frameworks/EPD64.framework/Versions/Current/bin:
/Users/user/anaconda/bin:/opt/local/bin:/opt/local/sbin:
/opt/local/bin:/opt/local/sbin:/usr/local/share/python:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:
/opt/X11/bin:/usr/local/git/bin:/usr/texbin

我将其剪切为:

/Library/Frameworks/EPD64.framework/Versions/Current/bin:
/usr/local/bin:
/usr/bin:/bin:
/opt/X11/bin:
/usr/local/git/bin:
/usr/texbin

但我仍然得到同样的错误。我怎么能剥掉上面所以它只是在EPD中使用必要的包,所以它不会导致与其他python / matplotlib安装冲突?我已经在网上的其他地方查看了Abort Trap: 6错误,但到目前为止没有任何帮助。

当我从源码安装matplotlib时似乎想写入:

/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/

我认为这是问题的原因。我已手动将EPD发行版写入源matplotlib文件。

最后一件可能相关的事情是:

我不得不使用我安装的brew安装python来安装wxWidgets(brew install wxWidgets),它安装了以下内容:

/Library/Caches/Homebrew/wxmac-3.0.0.0.tar.bz2

然后我更改了$ PATH以链接回EPD,因为它没有安装wx。出于某种原因,我无法使用EPD ipython / python激活安装wxWidgets。不会在这次安装中使用EPD会破坏什么吗?

0 个答案:

没有答案