标签:amp int usr col py3 gcc-c++ syn board python
[root@kazihuo~]# yum -y install gcc gcc-c++
[root@kazihuo /soft]# wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
[root@kazihuo /soft]# tar xvf Python-3.6.5.tgz
[root@kazihuo /soft/Python-3.6.5]# ./configure --prefix=/usr/local/python3.6.5
[root@kazihuo /soft/Python-3.6.5]# make && make install
[root@kazihuo /usr/bin]# rm python
[root@kazihuo /usr/bin]# ln -sv /usr/local/python3.6.5/bin/python3 /usr/bin/python
[root@kazihuo ~]# python -V
Python 3.6.5
?
注意:
因为yum使用python2,替换为py3后可能无法正常工作;
[root@kazihuo ~]# yum list
File "/usr/bin/yum", line 30
except KeyboardInterrupt, e:
^
SyntaxError: invalid syntax
修改yum配置文件即可解决;
[root@kazihuo ~]# head -1 /usr/bin/yum
#!/usr/bin/python2.7
标签:amp int usr col py3 gcc-c++ syn board python
原文地址:https://www.cnblogs.com/kazihuo/p/9049198.html