当前位置:   article > 正文

Python3开发环境准备

环境准备:使用python3.x,并完成开发环境的测试。

环境一:阿里云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 install -y redhat-lsb libXScrnSaver* epel-release libappindicator-gtk3 liberation-fonts
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 install -y 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 Tools -- Create Desktop Entry... -- Create the entry for all users
 7 #快捷方式---方式二
 8 vi /usr/share/applications/pycharm.desktop
 9 #添加
10 [Desktop Entry]
11 Encoding=UTF-8
12 Name=Pycharm
13 Comment=pycharm-2018.2.3
14 Exec=/root/pycharm-2018.2.3/bin/pycharm.sh
15 Icon=/root/pycharm-2018.2.3/bin/pycharm.png
16 Terminal=false  
17 StartupNotify=true  
18 Type=Application
19 Categories=Application;
20 #退出后,赋予权限
21 chmod a+x /usr/share/applications/pycharm.desktop
22 #复制到桌面,双击后信任

 

 6.快捷键

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

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

  

  2:显示桌面

  

  3:打开主目录

 

  4:启动chrome

  

  5:关闭窗口

   

 

 

 

  

转载于:https://www.cnblogs.com/jf8710/p/9655863.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小桥流水78/article/detail/867382
推荐阅读
相关标签
  

闽ICP备14008679号