【问题标题】:Can't install Pandas in PyCharm无法在 PyCharm 中安装 Pandas
【发布时间】: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 环境和管理包。
  • 这能回答你的问题吗? Errors while trying to install pip from terminal

标签: python pandas pip pycharm package


【解决方案1】:

我收到了同样的错误信息。 我什么都试过了。 原来Pycharm只有专业版的pandas和numpy。请检查您是否使用免费社区版本,它不支持 pandas 或 numpy

【讨论】:

    【解决方案2】:

    恕我直言,您需要安装openssl 和homebrew。

    brew install openssl
    

    你可以查看这个:Errors while trying to install pip from terminal

    【讨论】:

    • 您是否将其标记为重复?
    • 内容不完全相同。 Conda 或 Pycharm 可能有不同的结果。
    【解决方案3】:

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

    【讨论】:

    • 谢谢。这对我有用。其他的都太复杂了!
    【解决方案4】:

    不确定这是否有帮助,但我通常在 pycharm 中编写一个导入 pandas 的小 python 脚本,然后在脚本窗口中它会说“pandas not installed”然后我只需单击它并为我安装库。

    【讨论】:

      猜你喜欢
      • 2019-01-12
      • 1970-01-01
      • 2014-12-07
      • 2020-04-07
      • 2019-12-30
      • 2020-04-18
      • 2016-11-28
      • 2020-04-12
      • 2015-10-27
      相关资源
      最近更新 更多