Python3开发环境准备


环境一:阿里云CentOS7.4(HK,2核4G,10%突发性实例)

环境二:本子上的Win+Linux双系统

 

1.可视化界面

1 #安装X窗口
2 yum groups install -y "X Window System"
3 #安装MATE桌面
4 yum groups install -y "MATE Desktop"
5 #设计可视化界面启动
6 systemctl set-default graphical.target 
7 #重启
8 reboot

 

2.Chrome安装:

1 #解决依赖
2 yum -y install -y redhat-lsb libXScrnSaver* epel-release libappindicator-gtk3
3 #下载
4 wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
5 #安装
6 rpm -ivh google-chrome-stable_current_x86_64.rpm
7 #root用户下添加停用沙箱
8 cd /usr/share/applications
9 #找到Chrome 添加 --no-sandbox 

 

3.JDK安装

 1 #下载
 2 wget http://101.44.1.8/files/406700000752D161/download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.tar.gz
 3 #解压
 4 tar -zxvf jdk-10.0.2_linux-x64_bin.tar.gz
 5 #配置环境变量
 6 vi /etc/profile
 7 #添加
 8 export JAVA_HOME=/root/jdk-10.0.2
 9 export CLASSPATH=.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/lib/dt.jar:${JAVA_HOME}/lib/tools.jar
10 export PATH=$PATH:${JAVA_HOME}/bin
11 #使修改生效
12 source /etc/profile

 

4.Python3安装

 1 #解决依赖
 2 yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
 3 #下载
 4 wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz
 5 #创建目录
 6 mkdir /usr/local/python3 
 7 #解压
 8 tar -xvJf  Python-3.6.0.tar.xz
 9 #编译
10 cd Python-3.6.0
11 ./configure --prefix=/usr/local/python3
12 make && make install
13 #软链接
14 ln -s /usr/local/python3/bin/python3 /usr/bin/python3
15 ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3

 

5.Pycharm安装

 1 #下载
 2 wget https://download.jetbrains.8686c.com/python/pycharm-professional-2018.2.3.tar.gz
 3 #解压
 4 tar -zxvf pycharm-professional-2018.2.3.tar.gz
 5 #桌面快捷方式
 6 vi /usr/share/applications/pycharm.desktop
 7 #添加
 8 [Desktop Entry]
 9 Encoding=UTF-8
10 Name=Pycharm
11 Comment=pycharm-2018.2.3
12 Exec=/root/pycharm-2018.2.3/bin/pycharm.sh
13 Icon=/root/pycharm-2018.2.3/bin/pycharm.png
14 Terminal=false  
15 StartupNotify=true  
16 Type=Application
17 Categories=Application;
18 #退出后,赋予权限
19 chmod a+x /usr/share/applications/pycharm.desktop
20 #复制到桌面,双击后信任

 6.快捷键

 #应用程序-系统工具-设置-设备-键盘

  1:打开终端(命令:/usr/bin/gnome-terminal)

  

  2:显示桌面

  

  3:打开主目录

 

  4:启动chrome

  

  5:关闭窗口

   

 

 

 

  


作者:guojitian,发布于:2018/09/16
原文:https://www.cnblogs.com/jf8710/p/9655863.html