ubuntu安装pycharm

https://blog.csdn.net/qq_15192373/article/details/81091278

1. 下载PyCharm安装包

1)进入PyCharm官网,选择Professional专业版,直接点击DOWNLOAD,如图1;

                                                                                                 图1

2)进入跳转页面,出现提示框,点savefile,开始下载;

3)下载完成后,安装包在Downloads文件夹下,如图2;

                                                                                                 图2

2. 安装PyCharm

1)解压文件。右键安装包,点击“Extract Here”,如图3,图4;

                                                                                                图3 解压

                                                                                              图4 解压后

2)先整理文件夹,把 pycharm-2018.1.4 文件夹放在Downloads根目录,方便找到;

3)打开终端,进入pycharm-2018.1.4/bin;

cd Downloads/pycharm-2018.1.4/bin

4)执行pycharm.sh命令文件,开始安装;

sh ./pycharm.sh

5)出现Complete-Installation提示框,如图5,如果需要导入之前安装版本的配置的话,就选第一个,没有就选第二个。所以这里选第二个,直接点OK,如图5;

                                                                                                  图5

6)弹出 PyCharm Privary Policy Agreement,隐私政策协议框,点击Accept ,如图6;

                                                                                               图6

7)弹出PyCharm License Activation框,即PyCharm许可证激活。

     法1:

     a. Activation license with 激活许可证选择:License server License;

     b. server address许可证服务器地址填:http://idea.imsxm.com 

     c. 然后点击“Activate”即可,如图7。

    法2:

     a. 选择Activation Code激活方式,

     b. 修改host

     c. 直接用浏览器打开地址 ,点击该页面中的“获得注册码”,

    d. 复制该注册码,然后切换回Activation Code界面,输入注册码

    e. 然后点击“Activate”即可,如图7。

                                                                                                  图7

8)安装开始,很快,如图8。

                                                                                             图8

9)安装完成后,会弹出PyCharm Initial Configuration框,即PyCharm初始化配置,如图9;

     a. Keymap scheme:键盘方案,选择Eclipse,意思是设置Pycharm为Eclipse快捷键

     b. ide theme:皮肤主题,默认Intellij。可根据自己喜欢选其他的

     c. Editor colors and fonts:编辑器的主题,可以点击下面的“Click to hide preview”进行预览,这里选择的是 Darcula

     d. 然后下面的Create desktop entry 默认打勾就行了

    最后点击OK,完成设置。

                                                                                                图9

10)完成安装,如图10。

                                                                                                 图10

3. 在PyCharm中使用Anaconda作为编译器

     a. 点击Craete New Project,创建一个新的项目;

     b. 左边的列表选“Pure Python”;

     c. Interpreter选择安装的anaconda/bin/python (自己选),如图11;

     d. 选择ok,然后File--Default setting--Project interpreter--选择 anaconda/bin/python,如图12;

     e. 下次新建项目时,默认编译器路径就是 anaconda/bin/python,如图13;

                                                                                             图11                                                                               

                                                                                               图12

                                                                                               图13

4. 创建快捷方式

1)在/usr/share/applications创建一个文件:pycharm.desktop(touch,gedit,nano指令等)

  1. cd /usr/share/applications
  2. sudo gedit pycharm.desktop

2)编辑这个文件,添加以下内容

  1. [Desktop Entry]
  2. Version=1.0
  3. Type=Application
  4. Name=Pycharm
  5. Icon=/home/mengdan/Downloads/pycharm-2018.2.1/bin/pycharm.png
  6. Exec=sh /home/mengdan/Downloads/pycharm-2018.2.1/bin/pycharm.sh
  7. MimeType=application/x-py;
  8. Name[en_US]=pycharm

注意,这里Icon和Exec的绝对路径,从该文件的属性里查看:

3) 通过快捷方式打开软件,此时桌面左侧有快捷方式出现,然后锁定到桌面左侧

posted on 2020-10-28 21:37  一杯明月  阅读(5837)  评论(0编辑  收藏  举报