安装pycharm
准备工作
首先你需要去pycharm的官网去下载liunx的社区版点击这里进入官网
安装操作
我觉得吧,安装最好还是按照压缩包里面给的步骤来,我们看一下官方文档:
INSTALLATION INSTRUCTIONS
Linux Installation Instructions
-
Unpack the PyCharm distribution archive that you downloaded to
where you wish to install the program. We will refer to this destination
location as your {installation home} below. -
Open a console and cd into “{installation home}/bin” and type:
./pycharm.sh
to start the application. As a side effect, this will initialize various
configuration files in the ~/.PyCharmCE2019.1 directory. -
[OPTIONAL] Add “{installation home}/bin” to your PATH environment
variable so that you may start PyCharm from any directory. -
[OPTIONAL] To adjust the value of the JVM heap size, create
~/.PyCharmCE2019.1/config/pycharm.vmoptions (or pycharm64.vmoptions
if using a 64-bit JDK), and set the -Xms and -Xmx parameters. To see how
to do this, you can reference the vmoptions file under
“{installation home}/bin” as a model.
- 首先cd到压缩包所在目录,执行命令:
unzip pycharm-community-2019.1.2.tar.gz
- 解压缩完成之后cd到bin目录执行命令
:./pycharm.sh
- 最后添加环境变量说实话这一步我也不知道有什么用,应该是这样配置的话在命令行里面执行./pycharm.sh就可以运行pycharm了可是不行.
为pycharm创建快捷访问
准备工作
你需要在桌面创建一个文件名为:pycharm.desktop
用nano,vim,或者你喜欢的一款编辑器打开并输入以下内容:
[Desktop Entry]
Version=1.0
Type=Application
Name=Pycharm
Icon=/home/kai/myapp/pycharm-community-2019.1.2/bin/pycharm.png
Exec=/home/kai/myapp/pycharm-community-2019.1.2/bin/pycharm.sh
MimeType=application/x-py;
Name[en_US]=pycharm
png,sh文件的位置自己修改
开始见证奇迹
- 首先右击这个桌面文件选择allow launching(意思就是变可执行文件)
- 把这个文件拷贝到system文件夹下,执行命令:
sudo cp pycharm.desktop /usr/share/applications/
结束语
这个时候大家就可以直接舒舒服服的用pycharm了