如何在CentOS上降级python版本? [英] How to downgrade python version on CentOS?

查看:510
本文介绍了如何在CentOS上降级python版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行CentOS 6.6的专用Web服务器



我正在运行一些使用Python SHA模块的脚本,我认为当前的Python中已弃用该模块。版本。



我正在考虑降级Python安装,以便可以使用此模块。



还有更好的选择吗?如果没有,该怎么办?



这些是我的Python安装详细信息:

 
rpm-python-4.8.0-38.el6_6.x86_64
dbus-python-0.83.0-6.1.el6.x86_64
gnome-python2-2.28.0-3.el6.x86_64
gnome-python2-canvas-2.28.0-3.el6.x86_64
libreport-python-2.0.9-21.el6.centos.x86_64
gnome-python2-applet-2.28。 0-5.el6.x86_64
gnome-python2-gconf-2.28.0-3.el6.x86_64
gnome-python2-bonobo-2.28.0-3.el6.x86_64
python -urlgrabber-3.9.1-9.el6.noarch
python-tools-2.6.6-52.el6.x86_64
newt-python-0.52.11-3.el6.x86_64
python-ethtool-0.6-5.el6.x86_64
python-pycurl-7.19.0-8.el6.x86_64
python-docs-2.6.6-2.el6.noarch
gnome -python2-libegg-2.25.3-20.el6.x86_64
python-iwlib-0.1-1.2.el6.x86_64
libxml2-python-2.7.6-17.el6_6.1.x86_64
gnome-python2-gnome-2.28.0-3.el6.x86_64
python-iniparse-0.3.1-2.1.el6.noarch
gnome-python2-libwnck-2.28.0-5。 el6.x86_64
libproxy-python-0.3.0-10.el6.x86_64
pyth on-2.6.6-52.el6.x86_64
gnome-python2-gnomevfs-2.28.0-3.el6.x86_64
gnome-python2-desktop-2.28.0-5.el6.x86_64
gnome-python2-extras-2.25.3-20.el6.x86_64
abrt-addon-python-2.0.8-26.el6.centos.x86_64
at-spi-python-1.28 .1-2.el6.centos.x86_64
python-libs-2.6.6-52.el6.x86_64
python-devel-2.6.6-52.el6.x86_64


解决方案

您始终可以使用-altinstall参数安装不同版本的Python,然后在虚拟环境中运行它,或者只是使用python(version)命令运行命令。



大量的CentOS用Python编写,因此更改核心版本很可能会破坏某些功能。 / p>

I have a dedicated web server which runs CentOS 6.6

I am running some script that uses Python SHA module and I think that this module is deprecated in the current Python version.

I am consider downgrading my Python installation so that I can use this module.

Is there a better option? If not, how should I do it?

These are my Python installation details:

rpm-python-4.8.0-38.el6_6.x86_64
dbus-python-0.83.0-6.1.el6.x86_64
gnome-python2-2.28.0-3.el6.x86_64
gnome-python2-canvas-2.28.0-3.el6.x86_64
libreport-python-2.0.9-21.el6.centos.x86_64
gnome-python2-applet-2.28.0-5.el6.x86_64
gnome-python2-gconf-2.28.0-3.el6.x86_64
gnome-python2-bonobo-2.28.0-3.el6.x86_64
python-urlgrabber-3.9.1-9.el6.noarch
python-tools-2.6.6-52.el6.x86_64
newt-python-0.52.11-3.el6.x86_64
python-ethtool-0.6-5.el6.x86_64
python-pycurl-7.19.0-8.el6.x86_64
python-docs-2.6.6-2.el6.noarch
gnome-python2-libegg-2.25.3-20.el6.x86_64
python-iwlib-0.1-1.2.el6.x86_64
libxml2-python-2.7.6-17.el6_6.1.x86_64
gnome-python2-gnome-2.28.0-3.el6.x86_64
python-iniparse-0.3.1-2.1.el6.noarch
gnome-python2-libwnck-2.28.0-5.el6.x86_64
libproxy-python-0.3.0-10.el6.x86_64
python-2.6.6-52.el6.x86_64
gnome-python2-gnomevfs-2.28.0-3.el6.x86_64
gnome-python2-desktop-2.28.0-5.el6.x86_64
gnome-python2-extras-2.25.3-20.el6.x86_64
abrt-addon-python-2.0.8-26.el6.centos.x86_64
at-spi-python-1.28.1-2.el6.centos.x86_64
python-libs-2.6.6-52.el6.x86_64
python-devel-2.6.6-52.el6.x86_64

解决方案

You can always install a different version of Python using the -altinstall argument, and then run it either in a virtual environment, or just run the commands with python(version) command.

A considerable amount of CentOS is written in Python so changing the core version will most likely break some functions.

这篇关于如何在CentOS上降级python版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆