配置Python3&Python2环境
- 首先创建一个文件夹
py
,然后再这个文件夹里创建一个用于python3程序的py3
以及用于python2程序的py2
File
–>settings
–>Project:py
–>Project Interpreter
Project Interpreter
右边有小齿轮,点击之后Add
添加- 选择
Existing Environment
,Interpreter
项添加你的python3.exe
路径 - 同样的方法添加python2解释器
python2.exe
,有个默认解释器,我选择python3
Alt
+Shift
+F10
选择Edit Configurations
- 点击右上角
+
选择Python
name
最好就是填这个脚本的名字,Python Interpreter
根据这个程序是python3/python2
选择,Working directory
选择这个脚本的目录py3/py2
- python3程序只需
Alt
+Shift
+F10
即可无需配置运行,python2
需要改一下Python Interpreter
为python2
即可
个性化&主题
- 下载完成后,是一个
.jar
的文件,最好保存到pychram
的文件夹里面 File
–>settings
–>Editor
–>Color Schema
–>General
–>schema右边小齿轮
–>Import schema
- 导入后,在
schema
栏就可看到导入.jar
文件即可 - 也可直接
File'
–>Import Settings
直接导入
File
–>Import Settings
导入下载解压后里面的OneDark-Style.zip
消除波浪线
Pychrm里面默认有很多的提示警告波浪线,代码量一大看着就有点不舒服
File
–>Settings
–>Editor
–>Inspections
–>Python
更跟自己的需求勾选即可
这里我就全部不勾选了,这样代码就不会出现波浪线了
解决行数列太宽问题
File
–>Settings
–>Editor
–>Gutter Icons
右边可根据需求勾选