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

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

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

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

A: svg

当前项目使用的是 python2网站

这里写图片描述

我但愿将其设置为 python3,操做以下:
Step 1 . File - Settingsxml

这里写图片描述

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

这里写图片描述

Step 3 . 选择你须要的python版本 - Apply - OK图片

这里写图片描述

搞定

这里写图片描述



参考网站:
How to set the Python 2 Preference in PyCharm?
http://stackoverflow.com/questions/15845929/how-to-set-the-python-2-preference-in-pycharmget