简体   繁体   English

在python 2.7中没有发生pip升级

[英]pip upgrade not happening in python 2.7

I am in confusion. 我很困惑。 I have looked in other posts in regard to this problem. 关于这个问题,我已经查看了其他帖子。 In terminal of conda env., when I ran 在conda env。的终端,我跑的时候

conda list

all the packages are displayed with versions. 所有包都显示版本。 pip version is 8.0.2 点数版本是8.0.2

When I tried 当我尝试

 python -m pip install --upgrade pip

The cursor move to next line and blinks for long time. 光标移动到下一行并长时间闪烁。 I intend to update pip . 我打算更新pip。 The above line is suppose to upgrade pip. 上面这行是为了升级pip。 Am I missing something and what are possible solutions. 我错过了什么,有什么可能的解决方案。

Upgrade pip: 升级点数:

pip install --upgrade pip

Upgrade all packages with pip: 使用pip升级所有包:

import pip
from subprocess import call

for dist in pip.get_installed_distributions():
    call("pip install --upgrade " + dist.project_name, shell=True)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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