【问题标题】:How to deal with error message - Missing required dependencies ['numpy'] - using pycharm and anacoda如何处理错误消息 - 缺少必需的依赖项 ['numpy'] - 使用 pycharm 和 anaconda
【发布时间】:2019-12-12 06:06:23
【问题描述】:

我正在学习 python,希望这段代码能够正常工作。

import pandas

df =pandas.DataFrame([[2,4,6],[10,20,30]])
print(df)

这是我得到的:

File "C:\Users\User\Anaconda3\lib\site-packages\pandas\__init__.py", line 19, in <module>
    "Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']

我在 anaconda 环境中使用 pycharm。希望我已经正确设置了环境和解释器。它说我安装了 numpy 版本 1.16.2,但它不会让我升级到版本 1.17.0

尝试通过包和终端安装、卸载和升级以及升级pip。这是我得到的:

Installing collected packages: numpy
  Found existing installation: numpy 1.16.4
    Uninstalling numpy-1.16.4:
      Successfully uninstalled numpy-1.16.4
Successfully installed numpy-1.17.0
WARNING: You are using pip version 19.1.1, however version 19.2.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\User\Documents\Python>python -m pip install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/62/ca/94d32a6516ed197a491d17d46595ce58a83cbb2fca280414e57cd86b84dc/pip-19.2.1-py2.py3-none-any.whl (1.4MB)
     |████████████████████████████████| 1.4MB 114kB/s
Installing collected packages: pip
  Found existing installation: pip 19.1.1
    Uninstalling pip-19.1.1:
      Successfully uninstalled pip-19.1.1
Successfully installed pip-19.2.1

我对这一切都很陌生,可能做错了什么,请有人帮忙。

enter image description here

【问题讨论】:

    标签: python numpy pycharm anaconda


    【解决方案1】:

    我建议您尝试使用 Anaconda GUI Navigator,可通过 Anaconda Software Bundle 的标准下载获得。

    您可以使用不言自明的 GUI 轻松操作虚拟环境并安装/卸载不同的软件包。我发现它非常简单,也是开始使用 Anaconda 和 Python 的好方法:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-29
      • 1970-01-01
      • 2017-07-01
      • 1970-01-01
      • 2017-06-11
      相关资源
      最近更新 更多