python 2.6 升级到2.7
2017-04-09 14:54
260 查看
zabbix:/root# python -V Python 2.6.6 zabbix:/root# python Python 2.6.6 (r266:84292, Nov 22 2013, 12:16:22) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import redis Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named redis 下载python 2.7.3 Python-2.7.3.tgz 4.安装 tar -xzvf python-2.7.5.tar.gz cd python-2.7.5 ./configure --prefix=/usr/local/python27 #此一步务必记住不要覆盖掉centos6.4自带的python26,指定一个新的安装路径 make && make install 更改系统默认python指向 mv /usr/bin/python /usr/bin/python2.6.6.old #备份自带python26 ln -s /usr/local/python27/bin/python2.7 /usr/bin/python # 将系统默认python指向新安装的python27 node2:/root#ln -s /usr/local/python27/bin/python2.7 /usr/bin/python node2:/root#python -V
相关文章推荐
- Centos 6.4 python 2.6 升级到 2.7
- centos默认python2.6升级2.7
- Centos 6.4 python 2.6 升级到 2.7
- python2.6升级到2.7
- [转] Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- python 2.6 升级到 2.7
- python2.6升级到2.7
- centos6默认python2.6升级2.7
- fedora13 python2.6升级到python2.7
- centos yum 升级Python2.6 到 2.7
- CentOS5.6上将Python2.6升级成Python2.7
- CentOS 6.3上python2.6升级到2.7
- 2015-05-19-Centos-6-python-2.6-升级到-2.7
- Centos 6.4 python 2.6 升级到 2.7
- centos默认python2.6升级2.7
- centos x86 64bit 升级python2.6到2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7