为不同版本的python升级pip [英] Upgrading pip for different versions of python

查看:110
本文介绍了为不同版本的python升级pip的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在计算机上安装了两个版本的python(3.6和3.7).刚刚使用命令python -m pip install --upgrade pip将pip升级到最新版本(19.0.1),但是我认为它仅将python 3.6版的pip升级了.当尝试使用以下命令pip3.7 install scipy安装专门用于python版本3.7的软件包时,我收到消息说You are using pip version 18.1, however version 19.0.1 is available.显然,仅升级了3.6版本的pip.我也无法找出升级3.7点的命令.我尝试了以下方法:

I have two versions of python installed on my computer (3.6 and 3.7). Just upgraded pip to the latest version (19.0.1) using the command python -m pip install --upgrade pip however i think it only upgraded the pip for python version 3.6. When attempting to install a package specifically for python version 3.7 with the following command pip3.7 install scipy i got the message saying You are using pip version 18.1, however version 19.0.1 is available. Clearly only the pip for version 3.6 was upgraded. I cannot figure out a command to upgrade 3.7 pip as well. I tried the following:

python -m pip3.7 install --upgrade pip

这不起作用(尝试使用针对不同版本的python处理软件包的逻辑).找不到解决此特定问题的问题.任何帮助将不胜感激.

This did not work (Trying to use the logic of how packages are handled for different versions of python). Could not find a question that addressed this specific issue. Any help would be greatly appreciated.

推荐答案

使用python 3.7解释器运行命令:

Use the python 3.7 interpreter to run the command:

python3.7 -m pip install --upgrade pip

或直接使用pip3.7二进制文件:

Or use the pip3.7 binary directly:

pip3.7 install --upgrade pip

这篇关于为不同版本的python升级pip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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