运行'pip install -r requirements.txt --upgrade'时出错 [英] Error when running 'pip install -r requirements.txt --upgrade'

查看:223
本文介绍了运行'pip install -r requirements.txt --upgrade'时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Django项目中运行以下命令时:

When i run following command in my Django project:

pip install -r requirements.txt --upgrade

pip install -r requirements.txt --upgrade

我收到以下错误:

检测到一个无法安装的distutils安装项目("argparse"). distutils提供的元数据不包含 已安装文件的列表,因此pip不知道哪个 要卸载的文件.

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.

我的requirements.txt文件如下:

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

我的点子版本是点子8.0.0,我正在使用ubuntu.任何人都可以帮助解决问题吗?

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

推荐答案

如果您使用的是virtualenv,则不应该这样做,如果确实如此,那么这与您的问题类似.

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

OS X卸载distutils已安装项目

如果您确实删除了argparse软件包,则可以使用pip再次安装它.

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. :(

这篇关于运行'pip install -r requirements.txt --upgrade'时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆