使用'pip install -r requirements.txt'安装python包时出错

时间:2017-04-04 17:30:53

标签: python pip virtualenv

我正在尝试设置测试虚拟环境,但在使用pip install -r requirements.txt安装软件包时遇到问题。这是控制台的输出......

(test.env)[ django@hostname ~ ] $ pip install -r requirements.txt 
Downloading/unpacking CherryPy (from -r requirements.txt (line 1))
  Downloading CherryPy-10.2.1.tar.gz (688kB): 688kB downloaded
  Running setup.py egg_info for package CherryPy
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'
      warnings.warn(msg)
    error in CherryPy setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
    Complete output from command python setup.py egg_info:
    /usr/lib64/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires'

  warnings.warn(msg)

error in CherryPy setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /opt/svcacct/django/test.env/build/CherryPy
Storing complete log in /opt/svcacct/django/.pip/pip.log

这是pip.log。

------------------------------------------------------------
/opt/svcacct/django/test.env/bin/pip run on Tue Apr  4 13:21:01 2017
Downloading/unpacking CherryPy (from -r requirements.txt (line 1))

  Getting page https://pypi.python.org/simple/CherryPy/
  URLs to search for versions for CherryPy (from -r requirements.txt (line 1)):
  * https://pypi.python.org/simple/CherryPy/
  Analyzing links from page https://pypi.python.org/simple/cherrypy/
    Skipping link https://pypi.python.org/packages/00/81/82da01e5cd97a57f263afabde8869319603a6f81180ff75338e426b0bf04/CherryPy-5.0.0-py3-none-any.whl#md5=77d12ea74eeea269739162287e4f2811 (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Found link https://pypi.python.org/packages/03/4c/92f6ead7101ba4c0b46ead02f3fa70f32f066fbb2f62f654c84698f2afbf/CherryPy-3.8.0.tar.gz#md5=542b96b2cd825e8120e8cd822bc18f4b (from https://pypi.python.org/simple/cherrypy/), version: 3.8.0
    Found link https://pypi.python.org/packages/03/67/1e169f3a0267b986128f85a0391171dfb724a2791fecc376c0dffffcffa3/CherryPy-5.5.0.zip#md5=7a6be04a209f06d66c796be9fdfd6fec (from https://pypi.python.org/simple/cherrypy/), version: 5.5.0
    Found link https://pypi.python.org/packages/04/59/4692d4745f996bf86c9890e2273f6801271218611d814450708f66835d5f/CherryPy-5.4.0.zip#md5=03d089336c41b3b27eb3385e586048f5 (from https://pypi.python.org/simple/cherrypy/), version: 5.4.0
    Skipping link https://pypi.python.org/packages/04/7e/08857376cdd0302ac4b0167f7a29d089a1b2610f91f368aa83d2bd4e346a/CherryPy-10.1.1-py2.py3-none-any.whl#md5=8b0b9da04d28cf1c270453b75eeb43a2 (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Found link https://pypi.python.org/packages/04/aa/04b8568389691c64fb6bb550801ed6978877af73f5e7789fc97156c8b191/CherryPy-3.2.2.zip#md5=de2059a1309dd9a23dcb6385d2e4f08b (from https://pypi.python.org/simple/cherrypy/), version: 3.2.2
    Skipping link https://pypi.python.org/packages/05/e9/3019fad832ef9e9a5543a0cf0e79fc2fe08beab9d1b66770d735617fd24d/CherryPy-6.0.0-py3-none-any.whl#md5=25bc90fdc1250ae7f91c92a62b0b8292 (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Found link https://pypi.python.org/packages/07/85/a5267e171e81ccc90ce91b1d25af3869176f0c5a35bf6edc82ee53318242/CherryPy-3.3.0.tar.gz#md5=4ac4af5ac21a893f07221cbd7ec4be11 (from https://pypi.python.org/simple/cherrypy/), version: 3.3.0
    Found link https://pypi.python.org/packages/07/f6/dffeded9d1d803e00a2dbff9b550e6192fa2bf52ed7d7e1338e45e949d0f/CherryPy-3.2.4.zip#md5=c536caebc207731a0fba378818f841be (from https://pypi.python.org/simple/cherrypy/), version: 3.2.4
    Found link https://pypi.python.org/packages/08/94/604ea5084f478e526d6ba0f4a8040567182486ffdaec4e971c7b875787a1/CherryPy-3.0.4.tar.gz#md5=390ba4ece650103eb85895f820d63430 (from https://pypi.python.org/simple/cherrypy/), version: 3.0.4
    Found link https://pypi.python.org/packages/09/e0/54233d98bf970646ddd28e08995434712956da3650eb7657eec94cbbfa2f/CherryPy-5.6.0.tar.gz#md5=8f39072594675d5d41b00f8332e7a483 (from https://pypi.python.org/simple/cherrypy/), version: 5.6.0
    Found link https://pypi.python.org/packages/0b/83/237e6f668f5b453e25dd98c0acbf359715a7663715720b200ec851b6eadb/CherryPy-3.0.0.zip#md5=ba8ca921d2d653b1758dba66b077ed5b (from https://pypi.python.org/simple/cherrypy/), version: 3.0.0
    Skipping link https://pypi.python.org/packages/0b/b9/5e1228bfb7d596e5b8479469d83dadd66b6fcb6ed49ee6f3c6ff0620d6aa/CherryPy-8.4.0-py3-none-any.whl#md5=058b069f1c5b2a33846bbcdc3b5056ad (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Found link https://pypi.python.org/packages/0e/4b/7981c42c43fc55182ec15ee11308ea4e562f2f6a8498a213ac513b1d8f8c/CherryPy-2.3.0.tar.gz#md5=80ce0f666f2899d4e681432e4061db16 (from https://pypi.python.org/simple/cherrypy/), version: 2.3.0
    Skipping link https://pypi.python.org/packages/11/08/e4c35cbcf4587794499f2fb5c17ce8cd8fd688826958441d574ac12178cc/CherryPy-3.2.6.win-amd64.exe#md5=4145ccbd5133e26dbe07e4c7fb869391 (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .exe
    Found link https://pypi.python.org/packages/14/85/34bbd9508f72e5ae5a4c8fe30406389c484eee1f119b2236d285cb0c858f/CherryPy-8.0.0.tar.gz#md5=fd45a81e4032a83234402f40940cb2f3 (from https://pypi.python.org/simple/cherrypy/), version: 8.0.0
    Skipping link https://pypi.python.org/packages/14/c6/cb248da57dc45f5ca4ce19ce2b327eb954f3eaa42dff0b8ae9c66c629770/CherryPy-6.0.1-py3-none-any.whl#md5=104a492b8a876e405c81a00663a7dbcc (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Found link https://pypi.python.org/packages/15/91/a25362e8c0023380f3b055ccd39dc1451d96e84760b1e2743c7fa87e072b/CherryPy-3.8.1.tar.gz#md5=919301731c9835cf7941f8bdc1aee9aa (from https://pypi.python.org/simple/cherrypy/), version: 3.8.1
    Skipping link https://pypi.python.org/packages/15/a9/98bb7483bb6598c19d6bcef6cdd818ecebcb1ade7b78314d46d6a83dc24c/CherryPy-10.1.0-py2.py3-none-any.whl#md5=191ef1470a42d62a02f7f59e3ce1be3a (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Skipping link https://pypi.python.org/packages/17/ef/d52a720942c038c3e3ea64f42a287e8a6b0998db5125cd7afccb22b13e28/CherryPy-3.7.0.win-amd64.exe#md5=4223f7ac998a483bf6799416ba1cce87 (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .exe
    Skipping link https://pypi.python.org/packages/19/b6/6d28aafa56e72dafb97b0da8c386ae9cc7b08170cb3d84bc09c07361a057/CherryPy-10.0.0-py2.py3-none-any.whl#md5=9f5d457f5b3b5298f137f8ca36bfe9ba (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Skipping link https://pypi.python.org/packages/1c/2a/5b55db8c461666c406a92c31bd3384c579beedbfe2162c48cb94df351565/CherryPy-8.4.0-py2-none-any.whl#md5=e91a045b733d355a40ee5a79dbc8b708 (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Found link https://pypi.python.org/packages/1c/db/af94992bb0fb74f5968248e9e3ec5f405703c97cd97578874c9fb08a3bfa/CherryPy-8.8.0.tar.gz#md5=71bb74990ff2016826a4fe762d0c07a2 (from https://pypi.python.org/simple/cherrypy/), version: 8.8.0
    Skipping link https://pypi.python.org/packages/1c/ec/7d5a9de33c609638e120abb3351020fd8865cfe0e0a04b92a817edc28a58/CherryPy-5.2.0-py3-none-any.whl#md5=475861fd7dae3252676d16d76a946e24 (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Found link https://pypi.python.org/packages/1d/e7/2c64eb5e6d10241a9f510408f0e8944b50dc82741a0a60964b91c822a425/CherryPy-4.0.0.tar.gz#md5=4b765329b0b4b65ec25811e3febb6c93 (from https://pypi.python.org/simple/cherrypy/), version: 4.0.0
    Skipping link https://pypi.python.org/packages/1e/a6/2748d69ec979808163afab50b942eee243811ba36d838c7095516ed9eb6e/CherryPy-6.2.1-py3-none-any.whl#md5=10ff4740ca58cb7182047e62ad90372b (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Found link https://pypi.python.org/packages/1f/67/ab7075374ce3a6094426dce2789556ea47b50cdefe9d5375a18ab1e8a88f/CherryPy-3.2.0.tar.gz#md5=e5c1322bf5ce962c16283ab7a6dcca3f (from https://pypi.python.org/simple/cherrypy/), version: 3.2.0
    Found link https://pypi.python.org/packages/20/44/a013b6dd9b4b62f23f9f02d8a8a1941841dee511d6c5c96c993018546a7c/cherrypy-0.10.tar.gz#md5=1754cbda726f75ddda2f48dc1582b699 (from https://pypi.python.org/simple/cherrypy/), version: 0.10
    Found link https://pypi.python.org/packages/20/4b/04744b8068f3a6895088b197d7f49fa4c7ea21a63404d2a42996125b6a8e/CherryPy-2.1.1.tar.gz#md5=f36d73a8c38c1444285b37c3451dce86 (from https://pypi.python.org/simple/cherrypy/), version: 2.1.1
    Found link https://pypi.python.org/packages/22/57/7b2395e73821d17c9c73e67873dfecdd592f14ddff0af894f952245b5f55/CherryPy-6.0.1.tar.gz#md5=e7a11392e40bf2bef7672e31653cf6b0 (from https://pypi.python.org/simple/cherrypy/), version: 6.0.1
    Found link https://pypi.python.org/packages/24/69/fed8b803e83c99771761df77d671f2442231cc91d9eb7fa946b21aac1878/CherryPy-8.4.0a2.tar.gz#md5=08999c9db0aab3a6e3089dbf6910a691 (from https://pypi.python.org/simple/cherrypy/), version: 8.4.0a2
    Found link https://pypi.python.org/packages/25/ee/0705969a7669da05fa7cb5d2aac629c4d66e165bc353a686d84eb219fc8e/CherryPy-5.5.0.tar.gz#md5=11b2c0f0079ad584185cc3f0266737bd (from https://pypi.python.org/simple/cherrypy/), version: 5.5.0
    Found link https://pypi.python.org/packages/27/5d/f2439539c964f0564881d8f81b2daa7d7da5516e5451e098d4b1e45f547f/CherryPy-6.2.0.zip#md5=39d4b7a54c60efabd87342977ac8342b (from https://pypi.python.org/simple/cherrypy/), version: 6.2.0
    Found link https://pypi.python.org/packages/29/5b/f8d4e7befc8279d8362d17257f43719a87809bd9fdba2ac7f34fd03be24d/CherryPy-3.2.5.tar.gz#md5=bb130fbd5b6fa38d4e9f5c5597ea9800 (from https://pypi.python.org/simple/cherrypy/), version: 3.2.5
    Found link https://pypi.python.org/packages/2b/ef/c65f6eb4118cd80e5754ef052511b66ca298a5d16d542268f7804ea9c1ab/CherryPy-5.2.0.zip#md5=6bb5375217baafa6fdbcf2b47c6c259b (from https://pypi.python.org/simple/cherrypy/), version: 5.2.0
    Found link https://pypi.python.org/packages/2c/d1/94ba9be88192c9373becd04e6e5dab026414d62ee0f5f64d1cc15264fae9/CherryPy-8.4.0.tar.gz#md5=67609e163be5409a1ba40d50ed63a023 (from https://pypi.python.org/simple/cherrypy/), version: 8.4.0
    Found link https://pypi.python.org/packages/2f/33/2da1af98d6477a29423a9468c327dfd14f074c3db034f34d209bea3fae55/CherryPy-3.2.2.tar.gz#md5=c1b1e9577f65f9bb88bfd1b15b93b911 (from https://pypi.python.org/simple/cherrypy/), version: 3.2.2
    Found link https://pypi.python.org/packages/30/f7/8e0428d7e6fb33073d2aa440aaf5364e3a9d6c1a8ce58879c6afd43069e9/CherryPy-5.3.0.zip#md5=a2388f4342d6be5e0f8407a604b2da87 (from https://pypi.python.org/simple/cherrypy/), version: 5.3.0
    Found link https://pypi.python.org/packages/31/fc/125a87526c21d5b68956bcc886637ce31a063d15e956e33489aee3eb1a55/CherryPy-3.3.0.zip#md5=2ac3ba72d32fc6602610bc824558ac90 (from https://pypi.python.org/simple/cherrypy/), version: 3.3.0
    Found link https://pypi.python.org/packages/33/a3/ae7ab0057cbff41817cc55c8bd67ffd7472f94973e962e605ba525865645/CherryPy-2.3.0.zip#md5=ae7d164247b9577bc3dfb7050eb49ec7 (from https://pypi.python.org/simple/cherrypy/), version: 2.3.0
    Skipping link https://pypi.python.org/packages/34/93/c5ac4a6e196afb003cfdb390ae1e808c1d53a8435f929fce96592162b8f4/CherryPy-7.1.0-py3-none-any.whl#md5=c099e10408946bfa53950d690d5e851d (from https://pypi.python.org/simple/cherrypy/); unknown archive format: .whl
    Found link https://pypi.python.org/packages/35/d1/1108b4eaec2585bcfc7343096512c4e924e26a60542ab5885a5d06eb66fd/CherryPy-6.1.1.tar.gz#md5=0cec74b492ba4833165b9ab9fc5cc17d (from https://pypi.python.org/simple/cherrypy/), version: 6.1.1
"pip.log" 221L, 46789C                                                                                                                                                        

以防万一,这是我的requirements.txt文件。

CherryPy
Django
PyAMF
## FIXME: could not find svn URL in dependency_links for this package:
Twisted
cx-Oracle
docutils
lxml
pyOpenSSL
pycrypto
pygooglechart
pyodbc
pysqlite
python-cjson
python-ldap
pytz
soaplib
suds
wsgiref
xlrd
xlwt
zope.interface

我拿出了版本号,因为我想获得所有包的最新版本。

1 个答案:

答案 0 :(得分:8)

这似乎与过时的SetupTools有关。

运行pip install --upgrade setuptools,看看现在是否可以安装您的要求。

Discussion