2012-04-18 202 views
3

熊猫依赖于numpy,并且有一个open build issue 来安装熊猫依赖项。无论如何,在下面的例子中,为什么pip会退出numpy?如果使用需求文件也会发生。pip安装numpy熊猫失败?

$virtualenv /tmp/pandatest 
$source /tmp/pandatest/bin/activate 
$pip install numpy pandas 

然后在numpy安装中间熊猫安装程序被触发。

DeprecationWarning) 
C compiler: /usr/bin/gcc-4.0 -DNDEBUG -g -O3 -m32 

compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -  Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c' 
gcc-4.0: _configtest.c 
/usr/bin/gcc-4.0 _configtest.o -o _configtest 
_configtest 
failure. 
removing: _configtest.c _configtest.o _configtest 
building data_files sources 
build_src: building npy-pkg config files 
Downloading/unpacking pandas 
Running setup.py egg_info for package pandas 
# numpy needed to finish setup. run: 

    $ pip install numpy # or easy_install numpy 

....和numpy的测试时

(pandatest)$ python 
Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) 
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin 
Type "help", "copyright", "credits" or "license" for more information. 
>>> import numpy 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: No module named numpy 
+0

你有没有考虑EPDFree(www.enthought.com)?否则,您需要调试NumPy为什么会遇到构建问题。 – 2012-04-19 23:40:14

+0

该问题在0.7版中关闭。如果这个问题依然存在,请看[这个问题](http://stackoverflow.com/q/11797688/1301710)。唯一的解决方案似乎是首先安装numpy而不是其他软件包。 – bmu 2012-12-10 19:00:33

回答

1

可能发生的事情是:

它不能安装 “熊猫​​”,所以没有安装numpy的了。

PIP以这种方式工作:

如果您尝试安装多个软件包,如果这些软件包的一个根本不存在它打破了所有的安装,使大熊猫无法安装它不安装熊猫。

有一个在点子来解决这个问题,一个,我给一个镜头试图解决,但并非如此简单......

反正:

尝试单独安装一个软件包。

  1. 尝试安装numpy(它会工作)。
  2. 尝试安装熊猫(它 将无法​​正常工作,但你可以看到它为什么没有安装)