pip安装numpy pandas失败了吗?

时间:2012-04-18 17:28:37

标签: python pandas numpy pip

Pandas取决于numpy并且有一个open build issue  安装pandas依赖项。无论如何,在下面的例子中,为什么pip退出numpy的任何想法?如果使用需求文件也会发生。

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

然后在numpy设置的中间,panda设置被触发。

  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

1 个答案:

答案 0 :(得分:1)

可能发生的事情是:

它无法安装“pandas”,因此也没有安装numpy。

pip以这种方式工作:

如果您尝试安装多个软件包,并且其中一个软件包确实不存在,则会中断所有安装,因此无法安装pandas,因此不会安装pandas。

在pip中有一个问题需要解决这个问题,我试图解决这个问题,但不是那么简单......

反正:

尝试单独安装每个包。

  1. 尝试安装numpy(它会工作)。
  2. 尝试安装pandas(它     不起作用,但你将能够看到它没有安装的原因)