1 ,卸载 :windows 卸载 python
- 查看 python 的版本号 : dos 界面输入 python
看到 : Python 3.6.5
- 点击安装包 python.exe :
- 卸载 : 点击 uninstall
- 卸载成功的标志 :
- 测试卸载成功 : dos 界面运行不了 python
2 ,安装 :windows 安装 python
- 去 python 官网 : http://www.python.org
- 点击这里 :
- 点击下载 :
- 安装 :
- 选择安装路径 :
- 成功的标志 : dos 界面输入 python 看到版本号
- python 的 dos 操作 :
https://blog.csdn.net/qq_34319644/article/details/105156764
3 ,linux 操作系统安装 :
- linux 安装 : https://blog.csdn.net/qq_34319644/article/details/90574554
- linux 克隆 : https://blog.csdn.net/qq_34319644/article/details/90737512
- 软件包地址 : 百度云盘
链接:https://pan.baidu.com/s/1lLJK5-vKDvIq47N-h3kkVQ
提取码:vfpu
- 成功的标志:可以联网
4 ,安装 :linux 下载 python.tgz
- 检测内置 python 版本 : python
结果 : 2.6.6
结论 : centos6.9 对应 python 版本 2.6.6
- 我们的目的 : linux 上安装 python3 同时保留 python2
- 安装下载器 :
yum install sqlite-devel -y
- 去到指定目录 : cd /app/software
- 下载 : wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
5 ,安装 : linux 系统安装 python
- 解压 :
tar -xzvf Python-3.6.5.tgz -C /app/file/
- 安装 C 环境 :
yum -y install gcc gcc-c++ autoconf pcre pcre-devel make automake
- 安装 zlib : 压缩程序包
yum -y install zlib*
- 配置安装目录 :
cd /app/file/Python-3.6.5
./configure --prefix=/usr/local/python3/
- 编译 :
make && make install
结束的标志 : Successfully installed pip-9.0.3 setuptools-39.0.1
- 配置环境变量 :
vim /etc/profile
export PYTHON_HOME=/usr/local/python3/bin/
export PATH=$PATH:$PYTHON_HOME
保存 : :qw
- 刷新环境变量 :
source /etc/profile
6 ,安装成功的标志 :
- 输入 :python3
- 看到 :