无法在PyCharm中安装熊猫

时间:2020-01-08 19:10:37

标签: python pandas pip pycharm package

我是编程的新手。为了让我有点入门,我尝试使用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

由于我已经在Jypiter Notebook中安装了Pandas以便使用,因此Mac Terminal在输入pip install pandas时会给我以下内容:

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一起使用。 我在PyCharm 2019.3中使用Python 3.8,我的pip版本是19.0.3

我将很高兴得到任何帮助,非常感谢!

4 个答案:

答案 0 :(得分:2)

请尝试: Pycharm(在左上角)>首选项>项目>项目解释器> +(加号)(表格底部)>键入pandas>下载

答案 1 :(得分:0)

恕我直言,您需要将opensslhomebrew一起安装。

brew install openssl

您可以检查以下一项:Errors while trying to install pip from terminal

答案 2 :(得分:-1)

不确定这是否有帮助,但是我通常在pycharm中编写一个小的python脚本,该脚本会导入熊猫,然后在脚本窗口中显示“未安装熊猫”,然后单击它,然后为我安装了库。

答案 3 :(得分:-1)

我收到了相同的错误消息。 我尝试过一切。 事实证明,Pycharm专业版只有熊猫和numpy。请检查您是否使用免费的社区版本,它不支持熊猫或numpy