运行 'pip install -r requirements.txt --upgrade' 时出错
Error when running 'pip install -r requirements.txt --upgrade'
当我 运行 在我的 Django 项目中执行以下命令时:
pip install -r requirements.txt --upgrade
我收到以下错误:
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文件如下:
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
我的 pip 版本是 pip 8.0.0,我正在使用 ubuntu。任何人都可以帮助解决问题吗?
如果您使用的是 virtualenv,则不应发生这种情况,如果发生这种情况,那么这里有一个与您的问题类似的问题。
如果您删除了 argparse 包,可以使用 pip 重新安装它。
还没有足够的声誉将其写为评论。 :(
这听起来很像你在点击 https://github.com/pypa/pip/issues/3384 - 临时解决方案是固定 pip<8
当我 运行 在我的 Django 项目中执行以下命令时:
pip install -r requirements.txt --upgrade
我收到以下错误:
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文件如下:
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
我的 pip 版本是 pip 8.0.0,我正在使用 ubuntu。任何人都可以帮助解决问题吗?
如果您使用的是 virtualenv,则不应发生这种情况,如果发生这种情况,那么这里有一个与您的问题类似的问题。
如果您删除了 argparse 包,可以使用 pip 重新安装它。
还没有足够的声誉将其写为评论。 :(
这听起来很像你在点击 https://github.com/pypa/pip/issues/3384 - 临时解决方案是固定 pip<8