第一步:输入代码
curl https://bootstrap.pypa.io/pip/get-pip.py -o get-pip.py
在下载资源,等下载完了会显示100%
第二步:输入代码
sudo python3 get-pip.py
如果提示出现如下 黄色文字,执行第三步
WARNING: The directory '/Users/ma/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
第三步:输入代码
sudo chown -R yourUserName /Users/yourUserName/Library/Caches/pip
反馈:chown: yourUserName: illegal user name
第四步:重新输入自己需要的代码 pip install faker。此时下载成功