找不到pip已安装的模块 [英] Can't find the modules that have been installed by pip

查看:151
本文介绍了找不到pip已安装的模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用PyCharm,通常我会在PyCharm中使用 Project Interpreter 安装第3方库.今天,我通过在终端中运行pip install plotly==2.7进行了 plotly 的安装.但是,当我尝试导入它时,在编辑器中收到一个未解决的引用"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已安装的模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆