問題描述
我有一個(gè)運(yùn)行 CentOS 6.6 的專用網(wǎng)絡(luò)服務(wù)器
我正在運(yùn)行一些使用 Python SHA 模塊的腳本,我認(rèn)為該模塊在當(dāng)前 Python 版本中已被棄用.
我正在考慮降級(jí)我的 Python 安裝,以便我可以使用這個(gè)模塊.
還有更好的選擇嗎?如果沒有,我該怎么做?
這些是我的 Python 安裝細(xì)節(jié):
<上一頁(yè)>rpm-python-4.8.0-38.el6_6.x86_64dbus-python-0.83.0-6.1.el6.x86_64gnome-python2-2.28.0-3.el6.x86_64gnome-python2-canvas-2.28.0-3.el6.x86_64libreport-python-2.0.9-21.el6.centos.x86_64gnome-python2-applet-2.28.0-5.el6.x86_64gnome-python2-gconf-2.28.0-3.el6.x86_64gnome-python2-bonobo-2.28.0-3.el6.x86_64python-urlgrabber-3.9.1-9.el6.noarchpython-tools-2.6.6-52.el6.x86_64newt-python-0.52.11-3.el6.x86_64python-ethtool-0.6-5.el6.x86_64python-pycurl-7.19.0-8.el6.x86_64python-docs-2.6.6-2.el6.noarchgnome-python2-libegg-2.25.3-20.el6.x86_64python-iwlib-0.1-1.2.el6.x86_64libxml2-python-2.7.6-17.el6_6.1.x86_64gnome-python2-gnome-2.28.0-3.el6.x86_64python-iniparse-0.3.1-2.1.el6.noarchgnome-python2-libwnck-2.28.0-5.el6.x86_64libproxy-python-0.3.0-10.el6.x86_64python-2.6.6-52.el6.x86_64gnome-python2-gnomevfs-2.28.0-3.el6.x86_64gnome-python2-desktop-2.28.0-5.el6.x86_64gnome-python2-extras-2.25.3-20.el6.x86_64abrt-addon-python-2.0.8-26.el6.centos.x86_64at-spi-python-1.28.1-2.el6.centos.x86_64python-libs-2.6.6-52.el6.x86_64python-devel-2.6.6-52.el6.x86_64您始終可以使用 -altinstall 參數(shù)安裝不同版本的 Python,然后在虛擬環(huán)境中運(yùn)行它,或者只使用 python(版本)命令.
相當(dāng)多的 CentOS 是用 Python 編寫的,因此更改核心版本很可能會(huì)破壞某些功能.
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.
這篇關(guān)于如何在 CentOS 上降級(jí) python 版本?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!