Pycharm中未找到模块错误,但已作为Anaconda软件包安装

问题描述:

此后,我已经安装了Anaconda 3和pycharm CE.我可以选择解释器作为conda环境.但是,当我尝试使用某些软件包(例如matplotlib)时,会引发找不到模块错误".当我运行pip时,它返回说matplotlib可用.

I have installed Anaconda 3 and pycharm CE after that. I am able to chose the interpreter to be conda environment. But when I try using certain packages such as matplotlib it throws "Module not found error". When I run pip it returns saying that matplotlib is available.

pip install matplotlib
Requirement already satisfied: matplotlib in./anaconda3/lib/python3.6/site-packages

很明显,包装在那里,由于某种原因,它没有显示出来.

Clearly the package is there and for some reason it does not show up .

谢谢.

找到了解决方案. 进入Pycharm->首选项-> Python解释器

Found the solution. Went to Pycharm --> Preferences --> Python Interpreter

选择现有解释器"并指向〜/anaconda3/bin/python

selected "existing interpreter" and pointed to ~/anaconda3/bin/python

最后,现在所有与Anaconda3一起安装的软件包都已加载.

Finally now all the packages installed with Anaconda3 are loaded.

希望这对某人有帮助.

Hope this helps someone .