python2.6 升级为 2.7 CentOS 6.3自带的Python版本为2.6,首先需要升级到2.7版本。由于旧版本的Python已被深度依赖,所以不能卸载原有的Python,只能全新安装。
/usr/bin/python2.6
usr/bin/python2.6.6 8.配置iBus 将/usr/bin/ibus-setup 和 /usr/libexec/ibus-ui-gtk 这两个文件中exec python改为exec python2.6
查看版本 [root@localhost Python-2.7.8]# python Python 2.6.6 (r266:84292, Aug 18 2016...
centos安装默认python2.6升级为python2.7,并解决python工具包安装的各种问题。 思路指导:升级2.7不能用yum安装python工具包。...local/ # 编译安装: make make install # 检查 Python 版本: [root@dbmasterxxx ~]# python2.7 -V Python 2.7.8 4.备份python2.6...,设置python2.7 mv /usr/bin/python /usr/bin/python2.6 ln -s /usr/local/bin/python2.7 /usr/bin/python...Python 2.7.8 5.pip安装(pip 是一个安装和管理 Python 包的工具,用于取代easy_install) 升级为2.7后安装python模块不能使用yum,因为yum会把模块默认安装到python2.6
,因为ContOS里的很多库依赖Python2.6,当安装完Python2.7后会出现各种问题。如果能让其2个版本很好的并存可以解决此问题。...bootstrap.pypa.io/get-pip.py | python2.7 解决yum不能用的问题 因为yum不支持pthon2.7经过上面的步骤你会发现yum不能用了,这们上面安装的时候并没有移除掉python2.6.../usr/bin/python2.6 现在运行一下yum看看是不是能用了。 以上就是本文的全部内容,希望对大家的学习有所帮助。
requests Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6.../site-packages/requests/__init__.py", line 43, in import urllib3 File "/usr/lib/python2.6...connectionpool import HTTPConnectionPool, HTTPSConnectionPool, connection_from_url File "/usr/lib/python2.6
/usr/bin/python python修改为 python2.6 import sys try: import yum except ImportError:
1, download Python2.7 wget https://www.python.org/ftp/python/2.7.9/Python-2....
/usr/bin/python2.6 这样,整个升级过程才算完成!!.../usr/bin/python2.6 pip安装报错如下: Command python setup.py egg_info failed with error code 1 in /tmp/pip-build-root
版权声明:本文为博主原创文章,转载请注明源地址。 https://blog.csdn.net...
ll -tr /usr/bin/python* /usr/bin/python2.6-config /usr/bin/python2.6 /usr/bin/python /usr/bin/python2...原因是旧版的 pkg_resources 位于 /usr/lib/python2.6/site-packages 下。.../usr/bin/python2.6 但是,这种改法,万一哪天你 yum update 了一下,yum 被升级了后,又变回老样子了。.../usr/lib/python2.6/site-packages/ /usr/lib64/python2.6/site-packages/ 我的复制过程是这样的: cp -r /usr/lib/python2.6...python2.6/site-packages/pycurl.so /usr/local/lib/python2.7/site-packages/ cp -p /usr/lib64/python2.6/
site-packages/swift/obj/server.py", line 938, in __call__#012 res = method(req)#012 File "/usr/lib/python2.6...utils.py", line 520, in _timing_stats#012 resp = func(ctrl, *args, **kwargs)#012 File "/usr/lib/python2.6.../site-packages/swift/obj/server.py", line 286, in mkstemp#012 yield fd#012 File "/usr/lib/python2.6..._send(metric, timing_ms, 'ms', sample_rate)#012 File "/usr/lib/python2.6/site-packages/swift/common/..._target)#012 File "/usr/lib/python2.6/site-packages/eventlet/greenio.py", line 371, in sendto#012
>>> import sys >>> print sys.path ['', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64.../python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6.../lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/...usr/lib/python2.6/site-packages'] >>> sys.path.append('/home/test') >>> import mymoudle
', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old',...'/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages.../gtk-2.0', '/usr/lib/python2.6/site-packages'] >>> sys.platform 'linux2' >>> sys.modules {'copy_reg':...'/usr/lib64/python2.6/encodings/__init__.pyc'>, 'site': , 'readline': <module 'readline' from '/usr/lib64/python2.6
/site-packages/psshlib copying build/lib/psshlib/task.py -> /usr/lib/python2.6/site-packages/psshlib...copying build/lib/psshlib/askpass_server.py -> /usr/lib/python2.6/site-packages/psshlib copying build...-> /usr/lib/python2.6/site-packages/psshlib copying build/lib/psshlib/psshutil.py -> /usr/lib/python2.6...-> /usr/lib/python2.6/site-packages/psshlib byte-compiling /usr/lib/python2.6/site-packages/psshlib/...usr/lib/python2.6/site-packages/psshlib/cli.py to cli.pyc byte-compiling /usr/lib/python2.6/site-packages
/usr/bin/python2.6 //由原来的/use/bin/python改为/usr/bin/python2.6 import sys ....... 2)Python.../usr/bin/python2.6 //由原来的/use/bin/python改为/usr/bin/python2.6 # EASY-INSTALL-ENTRY-SCRIPT.../usr/bin/python2.6 //由原来的/use/bin/python改为/usr/bin/python2.6 from supervisor.supervisord
源码包安装pip 下载 https://pypi.python.org/packages/source/p/pip/ tar zxvf pip-0.7.2.tar.gz cd pip-0.7.2 python2.6...source/M/MySQL-python/ tar zxvf MySQL-python-1.2.3.tar.gz cd MySQL-python-1.2.3 yum install python-dev python2.6...setup.py build python2.6 setup.py install python2.6 >>> import MySQLdb .
in main OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:])) File "/usr/lib/python2.6...site-packages/novaclient/shell.py", line 716, in main args.func(self.cs, args) File "/usr/lib/python2.6..._cs_request(url, 'POST', **kwargs) File "/usr/lib/python2.6/site-packages/novaclient/client.py", line...286, in _cs_request **kwargs) File "/usr/lib/python2.6/site-packages/novaclient/client.py", line...268, in _time_request resp, body = self.request(url, method, **kwargs) File "/usr/lib/python2.6
Centos 6.x 共存安装Python 2.7 or 3.x Posted April 21, 2016 由于yum命令依赖系统的python2.6, 所以如果直接覆盖的话,会导致yum不能工作。...安装virtualenvwrapper 这一步实在自带的python2.6 上执行的, 所以如果用python 2.7 需要再创建的虚拟环境的时候指定 Bash pip install virtualenvwrapper...virtualenvwrapper.sh)出现logging no NullHandler Python Traceback (most recent call last): File "/usr/lib64/python2.6...runpy.py", line 122, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib64/python2.6.../runpy.py", line 34, in _run_code exec code in run_globals File "/usr/lib/python2.6/site-packages
领取专属 10元无门槛券
手把手带您无忧上云