寫在前面
本教程適用於 Pycharm 2022.2.3 以下所有版本
一、版本資訊
虛擬機器產品:VMware® Workstation 17 Pro 虛擬機器版本:17.0.0 build-20800274
ISO映像檔案:ubuntukylin-22.04-pro-amd64.iso
Pycharm版本:PyCharm 2022.3.3 (Professional Edition)
資源連結:
二、安裝教程
1.下載Pycharm安裝包與補丁
請讀者根據自己Linux系統的版本以及Linux系統自帶的Python版本與Pycharm的
破解補丁原網址:
https://segmentfault.com/a/1190000043441773
下載Pycharm安裝包與補丁到物理機:
將下載好的檔案
虛擬機器中,將pycharm安裝壓縮包放入虛擬機器中的 ~/下載 目錄下,將補丁放到桌面:
2.解壓並移動資料夾
將Pycharm安裝包解壓縮,把解壓縮後的檔案放到/usr/local目錄下,並且重新命名:
將補丁檔案(注意是整個檔案)移動到與Pycharm同一目錄下(這裡是/usr/local目錄下,請讀者根據自己的實際情況進行移動,位置並不絕對):
3.修改配置檔案
進入/usr/local/pycharm/bin目錄下,修改配置檔案pycharm64.vmoptions(2018版本及以下不需要在配置檔案pycharm64.vmoptions中輸入最後兩行程式碼,當然所有的註釋也沒必要寫入😊),👉切勿👈在修改配置檔案時加空格(請筆者自身檢查一下編輯後的檔案的每一行的尾部有無空格,如有空格,請自行刪除),會報錯找不到或無法載入主類 A!!!!!!
注意下方圖片紅色部分,需要讀者根據自己自身情況進行修改(讀者補丁所放的實際位置的絕對路徑,筆者這裡是/usr/local目錄下)
4.更改環境變數
讀者可根據自身實際情況決定這一步是否進行,該步驟的意義在於我們以後不需要每次都到pycharm資料夾下去啟動程式。
若配置完成環境變數後,在已經安裝Java的情況下使用jps時提示:找不到命令 “jps”,可能是環境變數配置順序影響,可參考以下文章解決:
https://blog.csdn.net/qq_67822268/article/details/136889908
5.啟動並啟用Pycharm
使用命令pycharm.sh啟動pycharm:
注意:啟動時啟動終端不能關閉!!!
勾選後點選繼續:
選擇不傳送:
選擇輸入啟用碼(啟用碼在文末)啟用:
至此Pycharm安裝成功!!!
讀者可以自行建立專案使用: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