从要求.txt失败

2024-10-01 07:41:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图安装一个旧项目的要求,我遇到了一些问题。其中一个我无法理解的错误是:

Requirement already satisfied (use --upgrade to upgrade): wsgiref==0.1.2 in /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 (from -r requirements.txt (line 38))
Installing collected packages: distribute, dj-database-url, django-celery, django-debug-toolbar, django-heroku-memcacheify, django-pylibmc-sasl, facebook-sdk, gdata, gevent, google-api-python-client, greenlet, gunicorn, htmlentities, httplib2, kombu, nltk, psycopg2, pygeoip, pylibmc, pymongo, python-dateutil, python-gflags, pytz, shortuuid, simplejson, sleekxmpp
  Running setup.py install for distribute
    Before install bootstrap.
    Scanning installed packages
    Setuptools installation detected at /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg
    Egg installation
    Patching...
    Renaming /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg into /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg.OLD.1401611004.21
    Patched done.
    Relaunching...
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    NameError: name 'install' is not defined
    Complete output from command /Users/pp/www/hintortwoDEV/venv/bin/python -c "import setuptools, tokenize;__file__='/Users/pp/www/hintortwoDEV/venv/build/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1G5NO8-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pp/www/hintortwoDEV/venv/include/site/python2.7:
    Before install bootstrap.

Scanning installed packages

Setuptools installation detected at /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg

Egg installation

Patching...

Renaming /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg into /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages/setuptools-3.5.1-py2.7.egg.OLD.1401611004.21

Patched done.

Relaunching...

Traceback (most recent call last):

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

NameError: name 'install' is not defined

----------------------------------------
Cleaning up...
Command /Users/pp/www/hintortwoDEV/venv/bin/python -c "import setuptools, tokenize;__file__='/Users/pp/www/hintortwoDEV/venv/build/distribute/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-1G5NO8-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/pp/www/hintortwoDEV/venv/include/site/python2.7 failed with error code 1 in /Users/pp/www/hintortwoDEV/venv/build/distribute
Storing debug log for failure in /Users/pp/.pip/pip.log

我根本不明白这个错误,所以你可以解释并合理地修正它,这将是令人敬畏的。在

更新1: (回答评论中的问题) @伯翰:python是2.7。我丢失了日志,因为我清理了它以向您显示特定的错误,但是其他错误,然后我无法复制它:( @是的,上面写着:pip 1.5.6 from /Users/pp/www/hintortwoDEV/venv/lib/python2.7/site-packages (python 2.7) @焊盘:distribute==0.6.28


Tags: installinvenvegglibpackageswwwsite