Module not found error in PyCharm , but it is installed as Anaconda package(在 PyCharm 中找不到模块错误,但它是作为 Anaconda 包安装的)
问题描述
之后我安装了 Anaconda 3 和 PyCharm CE.我可以选择解释器作为 Conda 环境.但是当我尝试使用某些包(例如 matplotlib)时,它会抛出Module not found error".当我运行 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.
推荐答案
显然选择的命名取决于操作系统,但是Python解释器可以选择如下:
Apparently the naming of the selection depends on the operating system, but the Python interpreter can be selected as follows:
- 文件 >首选项 >项目>Python 解释器 (MacOS)
- 文件 >设置 >项目>Python 解释器(Windows、Linux)
- File > Preferences > Project > Python Interpreter (MacOS)
- File > Settings > Project > Python Interpreter (Windows, Linux)
使用下拉菜单选择正确的 Python 解释器.根据您的操作系统和设置,这可以是默认解释器(例如 ~/anaconda3/bin/python)或对应于您选择的 Conda 环境的解释器(例如 C:users用户名.condaenvsprojectnamepython.exe).
Using the dropdown select the right Python interpreter. Depending on your OS and setup this can be the default interpreter (e.g. ~/anaconda3/bin/python) or the interpreter corresponding to the Conda environment of your choice (e.g. C:usersusername.condaenvsprojectnamepython.exe).
现在应该列出所有随 Anaconda 安装的软件包.
Now all the packages installed with Anaconda should be listed.
这篇关于在 PyCharm 中找不到模块错误,但它是作为 Anaconda 包安装的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 PyCharm 中找不到模块错误,但它是作为 Anacon
基础教程推荐
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 修改列表中的数据帧不起作用 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
- 包装空间模型 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 求两个直方图的卷积 2022-01-01
