ubuntu18.04 pycharm

一、下载pycharm

(1)进入官网下载Download PyCharm: The Python IDE for data science and web development by JetBrains

选择专业版(professional)直接点击下载(download),我下载的是2023.3.5版本。

(2)进行本地解压

-------------------------------------------先不要安装,为后面做准备工作------------------------------------------

二、重置PyCharm(新安装的不需要)

(1)打开scripts文件夹,选择uninstall.sh文件运行(ubuntu用户选择这个,windows用户选择.vbs)

运行:

bash 复制代码
sh ./uninstall.sh

(这个文件是卸载文件)

出现提示Done,即运行成功。

(2)运行install.sh文件

如果运行失败,请检查scripts及上级文件路径是否有中文,必须保证路径全英文。

提示Done即运行成功。

三、修改pycharm64.vmoptions文件

使用vim打开文件,加入以下内容:

其中第一行的地址需要修改为自己ja-netfilter.jar文件所在绝对路径,前面的-javaagent不能修改。

bash 复制代码
-javaagent:/Downloads/jetbra/jetbra/ja-netfilter.jar

--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED

三、修改hosts文件

命令窗口输入:

bash 复制代码
sudo gedit /etc/hosts

在里面添加:

bash 复制代码
0.0.0.0 account.jetbrains.com

四、PyCharm

(1)进入到下载包的bin文件夹里面

bash 复制代码
cd /Downloads/pycharm-professional-2023.3.5/pycharm-2023.3.5/bin

(2)执行pycharm.sh文件,开始安装

bash 复制代码
sh ./pycharm.sh

(3)选择Activation Code方式

输入注册码,然后点击"Activate"即可。

注册码在这个文件内:

注:这里第一次用注册码我操作成功了但是马上又让重新输入,然后换了其他的,附在下面,大家可以尝试一下:

bash 复制代码
WNlbnNlSWQ-eyJsaWNlbnNlSWQiOiJLUThLTUo3N1RZIiwibGljZW5zZWVOYW1lIjoiVW5pdmVyc2l0YXMgTmVnZXJpIE1hbGFuZyIsImxpY2Vuc2VlVHlwZSI6IkNMQVNTUk9PTSIsImFzc2lnbmVlTmFtZSI6IkpldOWFqOWutuahtiDorqTlh4blupflkI0iLCJhc3NpZ25lZUVtYWlsIjoibmtucWFyY214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DAKBggrBgEFBQcDATALBgNVHQ8EBAMCBaAwDQYJKoZIhvcNAQELBQADggIBANLG1anEKid4W87vQkqWaQTkRtFKJ2GFtBeMhvLhIyM6Cg3FdQnMZr0qr9mlV0w289pf/+M14J7S7SgsfwxMJvFbw9gZlwHvhBl24N349GuthshGO9P9eKmNPgyTJzTtw6FedXrrHV99nC7spaY84e+DqfHGYOzMJDrg8xHDYLLHk5Q2z5TlrztXMbtLhjPKrc2+ZajFFshgE5eowfkutSYxeX8uA5czFNT1ZxmDwX1KIelbqhh6XkMQFJui8v8Eo396/sN3RAQSfvBd7Syhch2vlaMP4FAB11AlMKO2x/1hoKiHBU3oU3OKRTfoUTfy1uH3T+t03k1Qkr0dqgHLxiv6QU5WrarR9tx/dapqbsSmrYapmJ7S5+ghc4FTWxXJB1cjJRh3X+gwJIHjOVW+5ZVqXTG2s2Jwi2daDt6XYeigxgL2SlQpeL5kvXNCcuSJurJVcRZFYUkzVv85XfDauqGxYqaehPcK2TzmcXOUWPfxQxLJd2TrqSiO+mseqqkNTb3ZDiYS/ZqdQoGYIUwJqXo+EDgqlmuWUhkWwCkyo4rtTZeAj+nP00v3n8JmXtO30Fip+lxpfsVR3tO1hk4Vi2kmVjXyRkW2G7D7WAVt+91ahFoSeRWlKyb4KcvGvwUaa43fWLem2hyI4di2pZdr3fcYJ3xvL5ejL3m14bKsfoOv

如果还是不行建议重启。

五、添加桌面快捷方式

在/usr/share/applications创建一个文件:pycharm.desktop

输入以下内容:

bash 复制代码
cd /usr/share/applications
sudo gedit pycharm.desktop
bash 复制代码
[Desktop Entry]
Version=1.0
Type=Application
Name=Pycharm
Icon=/Downloads/pycharm-professional-2023.3.5/pycharm-2023.3.5/bin/pycharm.png
Exec=sh /Downloads/pycharm-professional-2023.3.5/pycharm-2023.3.5/bin/pycharm.sh
MimeType=application/x-py;
Name[en_US]=pycharm

下面两句修改成自己的路径:

bash 复制代码
Icon=/Downloads/pycharm-professional-2023.3.5/pycharm-2023.3.5/bin/pycharm.png
Exec=sh /Downloads/pycharm-professional-2023.3.5/pycharm-2023.3.5/bin/pycharm.sh
相关推荐
神里大人4 小时前
idea、pycharm等软件的文件名红色怎么变绿色
java·pycharm·intellij-idea
张小生1804 小时前
PyCharm中 argparse 库 的使用方法
python·pycharm
叶知安4 小时前
如何用pycharm连接sagemath?
ide·python·pycharm
wowocpp8 小时前
ubuntu 22.04 硬件配置 查看 显卡
linux·运维·ubuntu
山河君8 小时前
ubuntu使用DeepSpeech进行语音识别(包含交叉编译)
linux·ubuntu·语音识别
knighthood20018 小时前
解决:ros进行gazebo仿真,rviz没有显示传感器数据
c++·ubuntu·ros
ClkLog-开源埋点用户分析16 小时前
ClkLog企业版(CDP)预售开启,更有鸿蒙SDK前来助力
华为·开源·开源软件·harmonyos
wowocpp19 小时前
ubuntu 22.04 server 安装 anaconda3
linux·运维·ubuntu
wowocpp1 天前
ubuntu 22.04 防火墙 ufw
linux·运维·ubuntu
过期动态1 天前
详解Python面向对象程序设计
开发语言·python·pycharm·django