欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

Python3开发环境准备

程序员文章站 2022-10-16 16:29:51
环境一:阿里云CentOS7.4(HK,2核4G,10%突发性实例) 环境二:本子上的Win+Linux双系统 1.可视化界面 2.Chrome安装: 3.JDK安装 4.Python3安装 5.Pycharm安装 6.快捷键 1:打开终端(命令:/usr/bin/gnome-terminal) 2 ......

环境一:阿里云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)

  Python3开发环境准备

  2:显示桌面

  Python3开发环境准备

  3:打开主目录

 Python3开发环境准备

  4:启动chrome

  Python3开发环境准备

  5:关闭窗口

   Python3开发环境准备