Can#39;t find the modules that have been installed by pip(找不到pip已经安装的模块)
问题描述
我使用 PyCharm,通常我使用 PyCharm 中的 Project Interpreter 安装 3rd 方库.今天我通过在终端中运行 pip install plotly==2.7
安装了 plotly.但是当我尝试导入它时,我在编辑器中收到了一个未解决的参考情节"警告.我该如何解决?
运行代码时出现此错误 ModuleNotFoundError: No module named 'plotly'
I use PyCharm, normally I install 3rd party libraries with the Project Interpreter in PyCharm. Today I installed plotly by running pip install plotly==2.7
in the terminal. But when I tried to import it, I got an unresolved reference 'plotly' warning in the editor. How can I solve it?
I got this error when I run the code ModuleNotFoundError: No module named 'plotly'
推荐答案
我知道问题出在哪里了.
pip 在 python2.7/site-packages
下安装包pip3 在 python3.6/site-packages
I figured out where the problem is.
pip installs packages under python2.7/site-packages
pip3 installs packages under python3.6/site-packages
所以我应该使用 pip3 install plotly==2.7
因为我使用的是 Python3.6
So I should use pip3 install plotly==2.7
since I'm using Python3.6
这篇关于找不到pip已经安装的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:找不到pip已经安装的模块


基础教程推荐
- Python kivy 入口点 inflateRest2 无法定位 libpng16-16.dll 2022-01-01
- 何时使用 os.name、sys.platform 或 platform.system? 2022-01-01
- 如何在海运重新绘制中自定义标题和y标签 2022-01-01
- Dask.array.套用_沿_轴:由于额外的元素([1]),使用dask.array的每一行作为另一个函数的输入失败 2022-01-01
- 在 Python 中,如果我在一个“with"中返回.块,文件还会关闭吗? 2022-01-01
- 线程时出现 msgbox 错误,GUI 块 2022-01-01
- 用于分类数据的跳跃记号标签 2022-01-01
- 筛选NumPy数组 2022-01-01
- 使用PyInstaller后在Windows中打开可执行文件时出错 2022-01-01
- 如何让 python 脚本监听来自另一个脚本的输入 2022-01-01