python直譯器和Pycharm編輯器安裝使用完整詳細教程
一、官網下載或軟體管家公眾號下載
二、安裝Python直譯器
python直譯器:對輸入的python程式碼進行解釋和執行
1、選擇自定義安裝並新增到環境變數
2、檢驗Python是否安裝成功
python --version或python -V
三、安裝pycharm編輯器
編輯器:寫程式碼的工具
1、點選安裝,修改安裝路徑,建議安裝C盤以外位置,修改好以後,點選Next。
2、建議不選擇.py選項,這是關聯檔案,如果打鉤了,以後電腦雙擊.java檔案就會用它開啟。
3、接下來點選Install,出現安裝介面。
4、配置pycharm環境
右擊電腦屬性,找到高階系統設定
5、新增到系統變數裡面的Path
雙擊編輯,點選新建,將pycharm程式路徑(桌面右鍵圖示-開啟檔案的所在位置)複製貼上,最後點選“確定”。
四、使用pycharm
1、啟用碼網站:
http://idea.javatiku.cn/
驗證碼:1567
啟用碼:
FU48Z7YY4K-eyJsaWNlbnNlSWQiOiJGVTQ4WjdZWTRLIiwibGljZW5zZWVOYW1lIjoi5r+A5rS75p2l5rqQIGlkZWHCt2phdmF0aWt1wrdjbiIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyMi0wNS0yNyIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjItMDUtMjciLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDIyLTA1LTI3IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyMi0wNS0yNyIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDIyLT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B2J1ysRudbkqmkUFK8xqhiZaYPd30TlmCmSAaGJ0eBpvkVeqA2jGYhAQRqFiAlFC63JKvWvRZO1iRuWCEfUMkdqQ9VQPXziE/BlsOIgrL6RlJfuFcEZ8TK3syIfIGQZNCxYhLLUuet2HE6LJYPQ5c0jH4kDooRpcVZ4rBxNwddpctUO2te9UU5/FjhioZQsPvd92qOTsV+8Cyl2fvNhNKD1Uu9ff5AkVIQn4JU23ozdB/R5oUlebwaTE6WZNBs+TA/qPj+5/wi9NH71WRB0hqUoLI2AKKyiPw++FtN4Su1vsdDlrAzDj9ILjpjJKA1ImuVcG329/WTYIKysZ1CWK3zATg9BeCUPAV1pQy8ToXOq+RSYen6winZ2OO93eyHv2Iw5kbn1dqfBw1BuTE29V2FJKicJSu8iEOpfoafwJISXmz1wnnWL3V/0NxTulfWsXugOoLfv0ZIBP1xH9kmf22jjQ2JiHhQZP7ZDsreRrOeIQ/c4yR8IQvMLfC0WKQqrHu5ZzXTH4NO3CwGWSlTY74kE91zXB5mwWAx1jig+UXYc2w4RkVhy0//lOmVya/PEepuuTTI4+UJwC7qbVlh5zfhj8oTNUXgN0AOc+Q0/WFPl1aw5VV/VrO8FCoB15lFVlpKaQ1Yh+DVU8ke+rt9Th0BCHXe0uZOEmH0nOnH/0onD
2、第一次使用,選擇建立新專案“New Project”。
3、修改專案存放目錄,建議C盤以外,其它預設即可,“LX”是我定義的專案名稱。
4、選中專案名稱LX,點選滑鼠“右鍵”,選擇“New”,然後選擇“Python File”
5、pycharm整體介面
6、介面設定
6.1、更改字型
6.2、新增新的模組
如果我們需要新增新的模組,點選左上角File,進入Settings,展開Project;untitled,點選Project Interpreter,點選綠色+號,然後直接搜尋
例:安裝lxml模組
6.3、設定檔案demo
進入Settings,展開Editor,點選Code style,點選file and code,然後右邊選擇file下的python script
展示內容可以自己編輯:
點選檢視程式碼
#-*- codeing = utf-8 -*-
#@Time : ${DATE} ${TIME}
#@Author : 名字
#@File : ${NAME}.py
#@Software ${PRODUCT_NAME}