繁体   English   中英

Python点不能安装任何东西

[英]Python pip cannot install anything

我正在尝试使用pip安装熊猫。

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:请注意,在虚拟环境中也会发生同样的情况

**

这是由于最近对Python.org网站的TLS弃用。

这个答案有细节。

总而言之,请按以下方式升级点子:

curl https://bootstrap.pypa.io/get-pip.py | python

然后运行:

pip install pandas

我会尝试sudo chown -R your_user_name / Users / bdisha / Library / Caches / pip / http和chown -R your_user_name / Users / bdisha / Library / Caches / pip

这篇文章可能有用

pip install -U pip

搜寻了很长一段时间后,我尝试了这个

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM