如何在Mac上安装pip3? [英] How to install pip3 on my Mac?

查看:256
本文介绍了如何在Mac上安装pip3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装pip3,但是我没有任何运气.另外,我尝试了sudo install,但它不起作用.如何在Mac上安装pip3?

I'm trying to install pip3, but I'm not having any luck. Also, I tried sudo install and it did not work. How could I install pip3 on my Mac?

sudo easy_install pip3
Password:
Searching for pip3
Reading https://pypi.python.org/simple/pip3/
Couldn't find index page for 'pip3' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/

No local packages or download links found for pip3
error: Could not find suitable distribution for Requirement.parse('pip3')

推荐答案

更新-1.5之后的自制版本

根据官方自制"页面:

2018年3月1日,python公式将升级到Python 3.x,并将添加python @ 2公式以安装Python 2.7(尽管这仅是桶,所以python和python2都不会添加到PATH中)默认情况下不带手动Brew链接--force).我们将维护python2,python3和python @ 3别名.

On 1st March 2018 the python formula will be upgraded to Python 3.x and a python@2 formula will be added for installing Python 2.7 (although this will be keg-only so neither python nor python2 will be added to the PATH by default without a manual brew link --force). We will maintain python2, python3 and python@3 aliases.

要安装Python 3,请运行以下命令:

So to install Python 3, run the following command:

brew install python3

然后,将自动安装pippip3,并且您可以通过pip install <package>安装任何软件包.

Then, the pip or pip3 is installed automatically, and you can install any package by pip install <package>.

因此您必须运行:

brew install python3
brew postinstall python3

请注意,您应该检查控制台,因为它可能会导致您出错,并且在这种情况下,未安装pip3.

Note that you should check the console, as it might get you errors and in that case, the pip3 is NOT installed.

这篇关于如何在Mac上安装pip3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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