python – 在eclipse中导入matplotlib

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

来自matplotlib import *

我得到了没有找到的回复.我将带有模块的文件夹添加到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


下一篇:python – Win 64bit GetThreadContext返回zeroe’d寄存器,或0x57错误代码