简体   繁体   中英

Can't find the modules that have been installed by pip

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'

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM