安装python3.6可能使用的依赖python
# yum -y install openssl-devel bzip2-devel expat-devel gdbm-devel gcc readline-devel sqlite-develsql
下载python3.6编译安装ide
到python官网下载https://www.python.orgui
下载最新版源码,使用make altinstall,若是使用make install,在系统中将会有两个不一样版本的Python在/usr/bin/目录中。这将会致使不少问题,并且很差处理。url
# wgethttps://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgzspa
# tar -xzvf Python-3.6.0.tgz -C /tmpdebug
# cd /tmp/Python-3.6.0/rest
把Python3.6安装到 /usr/local 目录orm
# ./configure --prefix=/usr/localsqlite
# make
# make install
python3.6程序的执行文件:/usr/local/bin/python3.6
python3.6应用程序目录:/usr/local/lib/python3.6
pip3的执行文件:/usr/local/bin/pip3.6
pyenv3的执行文件:/usr/local/bin/pyenv-3.6
更改/usr/bin/python连接
# cd/usr/bin
# mv python python.backup
# ln -s /usr/local/bin/python3.6 /usr/bin/python
# ln -s /usr/local/bin/python3.6 /usr/bin/python3
更改yum脚本的python依赖(yum依赖python2)
# cd /usr/bin
# ls yum*
yum yum-config-manager yum-debug-restore yum-groups-manager
yum-builddep yum-debug-dump yumdownloader
更改以上文件头为
#!/usr/bin/python 改成 #!/usr/bin/python2
修改gnome-tweak-tool配置文件
# vi /usr/bin/gnome-tweak-tool
#!/usr/bin/python 改成 #!/usr/bin/python2
修改urlgrabber配置文件
# vi /usr/libexec/urlgrabber-ext-down
#!/usr/bin/python 改成 #!/usr/bin/python2