简体   繁体   中英

Error when running 'pip install -r requirements.txt --upgrade'

When i run following command in my Django project:

pip install -r requirements.txt --upgrade

I get following error:

Detected a distutils installed project ('argparse') which we cannot uninstall. The metadata provided by distutils does not contain a list of files which have been installed, so pip does not know which files to uninstall.

My requirements.txt file is as follow:

Django==1.8.1
MySQL-python==1.2.5
pycrypto==2.6.1
Pillow==2.4.0
simplejson==2.3.2
uWSGI==2.0.8
pyBarcode==0.7
python-dateutil==2.4.0
xlwt==0.7.5
xhtml2pdf==0.0.6
reportlab==3.1.8
pymssql==2.0.1
boto
raven==5.1.1
djangorestframework==3.2.2
djangorestframework-jwt
django-model-utils==2.3.1
django-rest-swagger==0.3.3
django-session-security
pytz==2014.4
testtools
extras
testscenarios
django-ipware

My pip version is pip 8.0.0 and I am using ubuntu. Can any one help to resolve issue?

这听起来很像是您击中https://github.com/pypa/pip/issues/3384-临时解决方案是将pip <8

If you're using a virtualenv, this shouldn't happen,if it does, then here is a similar question to your problem.

OS X Uninstall a distutils installed project

If you do remove the argparse package, it can be installed again using pip.

Don't have enough reputation to write this as a comment yet. :(

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM