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