1、如果自己创建了conda虚拟环境,需要先将这个虚拟环境设置为python解释器
否则会报错:error running 'main' sdk is not defined for run configuration
步骤:
File > Settings > Projrct:XXX > Python interpreter > Add Interpreter > Add Local Interpreter >
Select existing > Type 选择conda > 然后在Environment中找到自己创建的虚拟环境即可
2、运行指令中需要传递参数,debug的时候怎么传参?
Run > Debug Configurations > 在Script parameters输入框中输入运行指令中定义的参数即可