安装pycharm,参考了:https://www.runoob.com/w3cnote/pycharm-windows-install.html
随意输入测试代码,出现Error: Please select a valid Python interpreter,其实主要是没有勾选上python导致,勾选后可以解决此问题。
步骤:1.查看python:file—setting—project:—python Interpreter
2.点击show all…点击+号
3.base interpreter,选择安装python.exe的路径(不清楚的可以看上一篇:https://blog.youkuaiyun.com/weixin_47316373/article/details/122827853?spm=1001.2014.3001.5501),点击ok
解决问题
查看python:file—setting—project:—python Interpreter
按ok退出
再次运行test.py