在PyCharm 软件中设置你的项目 使用的Python版本

python2 和 python3 有很大的不同,使用python2 编写的程序,如果使用python3 就运行不了;使用python3编写的程序,如果使用python2一样也是不用运行。

Q: 所以,如何在pyCharm 软件中,为你的项目设置 python 的版本?

A:

当前项目使用的是 python2 :

这里写图片描述

我希望将其设置为 python3,操作如下: 
Step 1 . File - Settings

这里写图片描述

Step 2 . Project [项目名] - Project Interpreter

这里写图片描述

Step 3 . 选择你需要的python版本 - Apply - OK

这里写图片描述

搞定

这里写图片描述

原文地址:https://www.cnblogs.com/kaola8023/p/8572480.html