Pychram设置python解释器(Project interpreter)

前言

运行python项目时,明明所需要的库已经安装好了,但是还是报错。检查python解释器,发现问题原因。–>无解释器或者解释器不对
Pychram设置python解释器(Project interpreter)_第1张图片

方法

1 打开interpreter setting,发现默认使用的解释器为base环境下python,而不是新建环境下的python
Pychram设置python解释器(Project interpreter)_第2张图片
在这里插入图片描述
打开下拉菜单,可以看到可以选择的python,选择对应环境下的python即可。
Pychram设置python解释器(Project interpreter)_第3张图片


2 若interpreter setting 里没有想要的python, 则选择Add interpreter
Pychram设置python解释器(Project interpreter)_第4张图片
选择新添加的python的路径
Pychram设置python解释器(Project interpreter)_第5张图片
可以按需勾选make available to all projects,其表示使所有项目默认使用该解释器
Pychram设置python解释器(Project interpreter)_第6张图片
添加完成后,再点击解释器位置,就可以进行选择使用了
Pychram设置python解释器(Project interpreter)_第7张图片
------tbc-------
有用可以点个大拇指哦

你可能感兴趣的:(python相关,python,pycharm)