配置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
右邊可根據需求勾選