在linux系统下安装Python3虚拟环境和eclipse 安装Python 3.6以及虚拟开发环境 安装eclipse

环境:VMware下centos7

使用软件包:eclipse-jee-neon-1a-linux-gtk-x86_64.tar.gz 和 Python-3.6.1.tar.xz

如有需要的朋友可以从网盘中下载软件包

链接:https://pan.baidu.com/s/1hm7nYKWThCydZGdGbSWlIg 密码:o9nb


1.关闭防火墙和selinux

systemctl stop firewalld

setenforce 0

PS:selinux是linux中的一种文件保护,关闭更方便我们进行操作

2.配置epel的yum源

vim /etc/yum.repos.d/epel.repo

[epel]

name=epel

baseurl=https://mirrors.aliyun.com/epel/7/x86_64/

gpgcheck=0

epel.repo里的内容

缓存软件包 :yum repolist

3.安装相关依赖包

yum -y install wget sqlite-devel xz gcc automake zlib-devel openssl-devel epel-release git

4.将Python安装包从windows导入linux系统

解压:tar xvf Python-3.6.1.tar.xz

5.(源码)编译安装

cd Python-3.6.1

./configure && make && make install

6.建立隔离环境py3

cd /opt/

python3 -m venv py3

在linux系统下安装Python3虚拟环境和eclipse
安装Python 3.6以及虚拟开发环境
安装eclipse
 

7.利用py3环境进行编写

source /opt/py3/bin/activate

在linux系统下安装Python3虚拟环境和eclipse
安装Python 3.6以及虚拟开发环境
安装eclipse
 

备注:centos7默认安装Python2.7。yum依赖于Python2.7的,所以只能安装虚拟开发环境而非卸载重下


安装eclipse

*0.centos7必须是基于图形化的安装方式

1.关闭防火墙和selinux

systemctl stop firewalld

setenforce 0

2.检查默认的jdk

java -version

在linux系统下安装Python3虚拟环境和eclipse
安装Python 3.6以及虚拟开发环境
安装eclipse
,一般有默认的jdk

3.安装java:

yum install java

4.将eclipse安装包从windows传到linux,解压到/opt/

tar xzvf eclipse-jee-neon-1a-linux-gtk-x86_64.tar.gz -C /opt/

5.把“快捷方式”和程序对应起来:

软连接

执行bin/eclipse时,实际上是执行/eclipse/eclipse

就像windows点击快捷方式一样

ln -s /opt/eclipse/eclipse /usr/bin/eclipse

6.创建"快捷方式"

vim /usr/share/applications/eclipse.desktop

[Desktop Entry]

Encoding=UTF-8

Name=Eclipse4.4.2

Comment=Eclipse Lnua

Exec=/usr/bin/eclipse

Icon=/opt/eclipse/icon.xpm

Categories=Application;Development;Java;IDE

Version=1.0

Type=Application

Terminal=0

eclipse.desktop中的内容

在linux系统下安装Python3虚拟环境和eclipse
安装Python 3.6以及虚拟开发环境
安装eclipse
 

7.打开eclipse,进行代码编写

在linux系统下安装Python3虚拟环境和eclipse
安装Python 3.6以及虚拟开发环境
安装eclipse