【发布时间】:2019-10-19 20:57:06
【问题描述】:
我尝试使用 sudo pip install requests 但终端一直说:
(base) OSX-MacBook-Pro:~ osx$ sudo pip install requests
WARNING: The directory '/Users/osx/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/Users/osx/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: requests in /anaconda3/lib/python3.7/site-packages (2.22.0)
Requirement already satisfied: certifi>=2017.4.17 in /anaconda3/lib/python3.7/site-packages (from requests) (2019.9.11)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /anaconda3/lib/python3.7/site-packages (from requests) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /anaconda3/lib/python3.7/site-packages (from requests) (1.24.2)
Requirement already satisfied: idna<2.9,>=2.5 in /anaconda3/lib/python3.7/site-packages (from requests) (2.8)
P/s:我之前安装过 Anaconda,现在已经卸载了。
【问题讨论】:
标签: python python-3.x pip anaconda