itgoyo / 500Days-Of-Github

⭐ 瞎JB折腾Mac/Linux/Windows过程中遇到的所有问题和解决方式 ⭐
https://itgoyo.github.io/500Days-Of-Github
138 stars 13 forks source link

关于 Mac 使用 pip3 时报错 DistributionNotFound: The 'pip==18.0' distribution was not found and is required #248

Open itgoyo opened 3 years ago

itgoyo commented 3 years ago

一、如何安装 pip Python 2.7.9 + 或 Python 3.4+ 以上版本都自带 pip 工具。 通过以下命令查看 pip 和 pip3 是否已安装:

pip -V  
pip3 -V  

如果提示还未安装,则可通过以下方式安装:

  1. 获取安装脚本:curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
  2. 用 python2.x 安装 pip:sudo python get-pip.py 用 python3.x 安装 pip3:sudo python3 get-pip.py
  3. 查看安装的 pip 版本号:pip -V 和 pip3 -V