mac pip3 装_如何在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')

解决方案

UPDATED - Homebrew version after 1.5

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.

So to install Python 3, run the following command:

brew install python3

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

The older version of Homebrew

Not only brew install python3 but also brew postinstall python3

So you must run:

brew install python3

brew postinstall python3

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值