gpt4 book ai didi

python - 在 eclipse 中导入 matplotlib

转载 作者:太空宇宙 更新时间:2023-11-03 13:51:15 24 4
gpt4 key购买 nike

我在 Ecplise (Python 2.7) 中运行 pydev。 Numpy 和 tkinter 工作正常,但我安装了 matplotlib,出于某种原因,当我尝试时

从 matplotlib 导入 *

我收到未找到的响应。我将带有模块的文件夹添加到 PythonPath,但不断收到相同的消息。我做错了什么?

最佳答案

来自 pydev tutorial (根据我的经验,与您的问题相关的两种最常见的情况):

1)

The most common error is having a problem in the environment variables used from the shell that spawned Eclipse, in a way that for some reason when getting the variables of one interpreter, it gathers the info from another interpreter (thus mixing the interpreter and the actual libraries).

2)

If you add something to your python installation, you need to either add it manually as a 'new folder' in the System PYTHONPATH (if it's still not under a folder in the PYTHONPATH) or (recommended) remove your interpreter and add it again, then, press apply.

关于python - 在 eclipse 中导入 matplotlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8467583/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com