【发布时间】:2020-04-26 08:58:45
【问题描述】:
我是一个编程新手。为了入门,我尝试使用pip install Pandas 在 PyCharm 中安装 Pandas。当我尝试通过终端或设置安装它时,我收到以下信息:
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/pandas/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/pandas/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/pandas/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', OSError(0, 'Error'))': /simple/pandas/
Could not find a version that satisfies the requirement pandas (from versions: )
No matching distribution found for pandas
由于我已经安装了 Pandas 以便在 Jypiter Notebook 中使用,因此在输入 pip install pandas 时,mac 终端会为我提供以下信息:
Requirement already satisfied: pandas in ./opt/anaconda3/lib/python3.7/site-packages (0.25.1)
Requirement already satisfied: pytz>=2017.2 in ./opt/anaconda3/lib/python3.7/site-packages (from pandas) (2019.3)
Requirement already satisfied: python-dateutil>=2.6.1 in ./opt/anaconda3/lib/python3.7/site-packages (from pandas) (2.8.0)
Requirement already satisfied: numpy>=1.13.3 in ./opt/anaconda3/lib/python3.7/site-packages (from pandas) (1.17.2)
Requirement already satisfied: six>=1.5 in ./opt/anaconda3/lib/python3.7/site-packages (from python-dateutil>=2.6.1->pandas) (1.12.0)
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError("bad handshake: SysCallError(-1, 'Unexpected EOF')"))) - skipping
虽然它看起来像是 Pandas 已经安装在计算机上(那里的 anaconda3 让我很烦恼),但它不适用于 PyCharm。 我使用 Python 3.8 和 PyCharm 2019.3,我的 pip 版本是 19.0.3
我会很高兴得到任何帮助,非常感谢!
【问题讨论】:
-
你为什么要试试这个
pip install python? -
很抱歉这个错误,我当然是
pip install pandas -
错误表明您尝试为 Python 3.7 安装 - 检查您使用
pip -V获得的版本。您可能需要为 Python 3.8 安装pip3.8- 或者您可能必须使用python3.8 -m pip install ... -
如果您使用 Anaconda,请不要使用 pip! 那里的 anaconda3 让我很困扰 咦,为什么?在任何情况下,都没有必要搞乱命令行。 PyCharm 可以通过 GUI 轻松创建 Conda 环境和管理包。
标签: python pandas pip pycharm package