更新适用于Python 3.6的pip3? [英] Update pip3 for Python 3.6?

查看:297
本文介绍了更新适用于Python 3.6的pip3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚使用Homebrew从Python 3.4升级到Python 3.6.

I just upgraded from Python 3.4 to Python 3.6 using Homebrew.

输出状态:

Pip, setuptools, and wheel have been installed. To update them
  pip3 install --upgrade pip setuptools wheel
You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.6/site-packages

我尝试运行

pip3 install --upgrade pip setuptools wheel

但是它不会升级适用于Python 3.6的pip.相反,它在Python 3.4中找到pip3并说要求已满足":

But it does not upgrade pip for Python 3.6. Instead it finds pip3 in in Python 3.4 and says 'requirement satisfied':

Requirement already up-to-date: pip in /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages
Collecting setuptools
  Downloading setuptools-33.1.1-py2.py3-none-any.whl (472kB)
    100% |████████████████████████████████| 481kB 1.0MB/s 
Collecting wheel
  Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
    100% |████████████████████████████████| 71kB 5.7MB/s 
Installing collected packages: setuptools, wheel
  Found existing installation: setuptools 12.0.5
    Uninstalling setuptools-12.0.5:
      Successfully uninstalled setuptools-12.0.5
Successfully installed setuptools-33.1.1 wheel-0.29.0

当我检查pip版本时,它是在Python 3.4中,而不是3.6中.我该如何解决?

When I check the pip version, it is in Python 3.4, not 3.6. How do I resolve this?

$ pip3 -V
pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages (python 3.4)

推荐答案

如果没有但是,您可以告诉Mac上的终端使用哪个Python点:

You can however tell the terminal on your mac which Python pip to use with:

python3.6 -m pip install --upgrade pip setuptools wheel

如果需要在旧版本的Python3上使用pip,可以将python3.6更改为python3.4.

You can change python3.6 to python3.4 if you need to use pip on the older Python3 version.

这篇关于更新适用于Python 3.6的pip3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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