如何将 Debian Linux 中的默认的 Python 版本切换为替代版本
1个回答
展开全部
安装好替代版本
直接做软连接就可以了
[root@iZ259r7h4pfZ ~]# whereis python
python: /usr/bin/python2.6 /usr/bin/python /usr/lib/python2.6 /usr/lib64/python2.6 /usr/local/bin/python /usr/local/bin/python2.7-config /usr/local/bin/python2.7 /usr/local/lib/python2.7 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
[root@iZ259r7h4pfZ ~]# ll /usr/bin/python
lrwxrwxrwx 1 root root 24 Nov 22 2014 /usr/bin/python -> /usr/local/bin/python2.7
直接做软连接就可以了
[root@iZ259r7h4pfZ ~]# whereis python
python: /usr/bin/python2.6 /usr/bin/python /usr/lib/python2.6 /usr/lib64/python2.6 /usr/local/bin/python /usr/local/bin/python2.7-config /usr/local/bin/python2.7 /usr/local/lib/python2.7 /usr/include/python2.6 /usr/share/man/man1/python.1.gz
[root@iZ259r7h4pfZ ~]# ll /usr/bin/python
lrwxrwxrwx 1 root root 24 Nov 22 2014 /usr/bin/python -> /usr/local/bin/python2.7
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询