zoukankan      html  css  js  c++  java
  • ubuntu搭建python开发环境

    一、安装Python解释器(免)

      ubuntu系统自带python2.7和python3.6,位于/usr/bin/,直接执行"ptyhon"运行的是python2.7,执行"python3",才能运行python3.6。可参考下面的文件属性:

      lrwxrwxrwx 1 root root 9 4月 16 2018 python -> python2.7
      lrwxrwxrwx 1 root root 9 4月 16 2018 python2 -> python2.7
      -rwxr-xr-x 1 root root 3637096 11月 7 18:07 python2.7

      lrwxrwxrwx 1 root root 9 11月 23 04:09 python3 -> python3.6
      -rwxr-xr-x 2 root root 4526456 11月 7 18:44 python3.6

    二、安装pip3

      1、安装

        $>sudo apt-get install python-pip3

        说明:

          若直接使用"pip install <python库>",会安装到python2对应的库里(~/.local/lib/python2.7/site-packages)。

          使用"pip3 install <python库>",才会安装到python3对应的库里(~/.local/lib/python3.6/site-packages)

      2、配置pip源为阿里云的镜像源

        $>pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/  //全局永久更换

        $>pip install <包名> -i https://mirrors.aliyun.com/pypi/simple/  /局部/临时使用

    三、安装pycharm

      1、安装

        下载tar包,tar开。如:pycharm-community-2019.3.3.tar.gz

        配置pycharm的Python解释器,可选择系统自带的Python3.6

      2、添加快捷方式

      1、打开终端,使用nano编辑器新建pycharm.desktop

    [Desktop Entry]
    Version=18.0
    Name=pycharm
    Comment=pycharm IDE
    Exec=/home/zyz/app/pycharm/bin/pycharm.sh
    Icon=/home/zyz/app/pycharm/bin/pycharm.png
    Terminal=false
    Type=Application
    Categories=Utility;Application;

     2、右键"属性"->"权限"->"作为应用程序执行"。

  • 相关阅读:
    如何使界面在较大的屏幕上居中,并且在设计期可以按期望的界面尺寸进行设计?
    Embedding programmatic skins in CSS and compiling to SWF
    将应用程序11M内存占用,降至500K左右
    [转载]FCKeditor添加自定义按钮
    fieldset标签的使用
    转贴
    面向对象的好处
    61条面向对象设计的经验原则
    用 Git 操作的数据库?这个项目火了!
    千万别强制停机!我嘴都气歪了!
  • 原文地址:https://www.cnblogs.com/beast-king/p/12484511.html
Copyright © 2011-2022 走看看