我正在尝试用pip安装pandas。
sudo pip install pandas
我收到以下错误:
➜ ~ which python
/usr/bin/python
➜ ~ python --version
Python 2.7.10
➜ ~ sudo pip install pandas
The directory '/Users/bdisha/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.
The directory '/Users/bdisha/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.
Collecting pandas
Could not fetch URL https://pypi.python.org/simple/pandas/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) - skipping
Could not find a version that satisfies the requirement pandas (from versions: )
No matching distribution found for pandas
我做错了什么?
**
PS:请注意,在虚拟环境中也会发生同样的事情
**
答案 0 :(得分:1)
这是由于最近对Python.org网站的TLS弃用。
This回答有详细信息。
总结一下,升级点如下:
curl https://bootstrap.pypa.io/get-pip.py | python
然后运行:
pip install pandas
答案 1 :(得分:0)
我会尝试sudo chown -R your_user_name / Users / bdisha / Library / Caches / pip / http和chown -R your_user_name / Users / bdisha / Library / Caches / pip
此post可能有用
答案 2 :(得分:0)
pip install -U pip
搜索了很长时间后,我尝试了this。