2012-04-18 201 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. 嘗試安裝熊貓(它 將無法​​正常工作,但你可以看到它爲什麼沒有安裝)