macOS 安装 pip

macOS 安装 pip3

在这里插入图片描述

步骤

curl https://bootstrap.pypa.io/get-pip.py | python3

检查与测试

python3 -m pip list
python3 -m pip install -i https://mirrors.aliyun.com/pypi/simple requests

参考

https://www.jianshu.com/p/62bea7d3708c
https://pip.pypa.io/en/stable/installing/
Warning: pip is being invoked by an old script wrapper   
https://stackoverflow.com/questions/60029215/warning-pip-is-being-invoked-by-an-old-script-wrapper

冗余信息

as4k@bogon ~ % curl https://bootstrap.pypa.io/get-pip.py | python3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1825k  100 1825k    0     0   8876      0  0:03:30  0:03:30 --:--:-- 14231
Defaulting to user installation because normal site-packages is not writeable
Collecting pip
  Downloading pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 9.6 kB/s
Installing collected packages: pip
  WARNING: The scripts pip, pip3 and pip3.7 are installed in '/Users/as4k/Library/Python/3.7/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.1.1
WARNING: You are using pip version 19.0.3; however, version 20.1.1 is available.
You should consider upgrading via the '/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install --upgrade pip' command.

as4k@bogon ~ % pip3 list
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
Package    Version
---------- -------
pip        20.1.1
setuptools 40.8.0
six        1.12.0
wheel      0.33.1
as4k@bogon ~ % python3 -m pip list
Package    Version
---------- -------
pip        20.1.1
setuptools 40.8.0
six        1.12.0
wheel      0.33.1

macOS 安装 pip2

在这里插入图片描述

步骤

curl https://bootstrap.pypa.io/get-pip.py | python

检查与测试

python2 -m pip list
which pip
pip --version
python -m pip install --upgrade pip  -i https://mirrors.aliyun.com/pypi/simple/

参考

https://www.jianshu.com/p/62bea7d3708c
https://pip.pypa.io/en/stable/installing/

冗余信息

as4k@bogon ~ % curl https://bootstrap.pypa.io/get-pip.py | python
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1825k  100 1825k    0     0  10168      0  0:03:03  0:03:03 --:--:--  7640
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting pip
  Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  WARNING: The scripts pip, pip2 and pip2.7 are installed in '/Users/as4k/Library/Python/2.7/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-20.1.1
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

凯尔kyle

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值