dulei@duleideMacBook-Pro ~ % where python
/usr/bin/python
更新pip3
pip3 install --upgrade pip
dulei@duleideMacBook-Pro ~ % pip3 install --upgrade pip
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in ./Library/Python/3.8/lib/python/site-packages (21.2.4)
Collecting pip
Downloading pip-21.3.1-py3-none-any.whl (1.7 MB)|████████████████████████████████|1.7 MB 651 kB/s
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 21.2.4
Uninstalling pip-21.2.4:
Successfully uninstalled pip-21.2.4
WARNING: The scripts pip, pip3 and pip3.8 are installed in'/Users/dulei/Library/Python/3.8/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-21.3.1
查看已安装库
dulei@duleideMacBook-Pro ~ % pip3 list
Package Version
---------- -------
imageio 2.9.0
numpy 1.21.2
Pillow 8.3.1
pip 21.3.1
setuptools 49.2.1
six 1.15.0
wheel 0.33.1
查看可以更新的第三方库
dulei@duleideMacBook-Pro ~ % pip3 list --outdated
Package Version Latest Type
---------- ------- ------ -----
imageio 2.9.0 2.13.3 wheel
numpy 1.21.2 1.21.4 wheel
Pillow 8.3.1