Can't find the modules that have been installe

2019-01-28 12:42发布

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'

1条回答
对你真心纯属浪费
2楼-- · 2019-01-28 12:51

I figured out where the problem is.
pip installs packages under python2.7/site-packages
pip3 installs packages under python3.6/site-packages

So I should use pip3 install plotly==2.7 since I'm using Python3.6

查看更多
登录 后发表回答