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:
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