簡體   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