【问题标题】:How do I make pandas installed via Anaconda usable by PyCharm?如何使 PyCharm 可以使用通过 Anaconda 安装的 pandas?
【发布时间】:2016-10-10 12:55:15
【问题描述】:

我使用的是 Windows 10 并已安装 Anaconda3 (2016-1)。当我使用 Anaconda 安装的 Spyder 时,import pandas 有效。

但是我不能从 PyCharm import pandas。 PyCharm 设置为使用C:\Users\Chris>C:\Users\Chris\Anaconda3\envs\Conda\python.exe

如果我直接调用 exe,我也不能 import pandas 尽管它在 Anaconda3 字典中。

C:\Users\Chris>C:\Users\Chris\Anaconda3\envs\Conda\python.exe
Python 3.5.1 |Continuum Analytics, Inc.| (default, Feb 16 2016, 09:49:46) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'pandas'

我需要做什么才能import pandas

【问题讨论】:

  • 您在使用 Spyder 时是否使用由 conda 创建的单独环境?如果你这样做,那么它是一个不同的解释器。
  • @LuisMasuelli :我使用 Anaconda 安装的 Spyder。不知道Anaconda是否安装了特殊环境。

标签: python pandas pycharm anaconda


【解决方案1】:

当我将路径设置为 C:\Users\Chris&gt;C:\Users\Chris\Anaconda3\python.exe 而不是像 PyCharm 建议的那样使用带有 C:\Users\Chris&gt;C:\Users\Chris\Anaconda3\envs\Conda\python.exe 的虚拟环境时,它可以工作。

【讨论】:

  • 你说的是哪条路?
猜你喜欢
  • 2018-10-11
  • 2020-07-21
  • 2019-05-12
  • 1970-01-01
  • 1970-01-01
  • 2020-08-17
  • 1970-01-01
  • 2019-06-12
  • 2016-07-12
相关资源
最近更新 更多