1.成功安装模块,无法导入
今天安装完模块pyppeteer,pycharm导入失败,从python的Lib下可以清楚的看到已经安装成功
![PyCharm:no module named * 解决方法](https://www.binbinbiji.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
2.添加当前python环境,不使用默认项目的环境
file>settings>project:(你的项目)>project interpreter
可以看到默认使用的是项目虚拟的一个解释器
![PyCharm:no module named * 解决方法](https://www.binbinbiji.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
3.添加自己安装的python解释器
show All
Add python interpreter>Vir.. Envir…>Existing envir…
![PyCharm:no module named * 解决方法](https://www.binbinbiji.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
![PyCharm:no module named * 解决方法](https://www.binbinbiji.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
4.切换到自己新配置的解释器,可以看到新安装的模块了。
![PyCharm:no module named * 解决方法](https://www.binbinbiji.com/wp-content/themes/justnews/themer/assets/images/lazy.png)
到此为止。
发布者:彬彬笔记,转载请注明出处:https://www.binbinbiji.com/python/2433.html