pip install与pip install -r

时间:2013-12-08 16:11:24

标签: python pip

我想在requirements.txt文件中管理脚本的依赖项。

# i.txt
numpy
numexpr

但是pip install -r i.txt失败了:

Downloading/unpacking numpy (from -r i.txt (line 1))
...
    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/src/npysort -Inumpy/core/include -I/usr/include/python2.7 -c'
    i686-linux-gnu-gcc: _configtest.c
    i686-linux-gnu-gcc -pthread _configtest.o -o _configtest
    _configtest
    failure.
    removing: _configtest.c _configtest.o _configtest
    building data_files sources
    build_src: building npy-pkg config files

    warning: no files found matching 'tools/py3tool.py'
    warning: no files found matching '*' under directory 'doc/sphinxext'
Downloading/unpacking numexpr (from -r i.txt (line 2))
  Downloading numexpr-2.2.2.tar.gz (75kB): 75kB downloaded
  Running setup.py egg_info for package numexpr
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pandas_project/pandas_env/build/numexpr/setup.py", line 16, in <module>
        import numpy
    ImportError: No module named numpy
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pandas_project/pandas_env/build/numexpr/setup.py", line 16, in <module>

    import numpy

ImportError: No module named numpy

可是:

pip install numpy && pip install numexpr

工作得很好。所以这两种方法必须有一个非常基本的区别 - 我不知道吗?

0 个答案:

没有答案