我不是 Python 或 CentOS(CloudLinux 6.6 + WHM/cPanel)专家,但我正在尝试在 CentOS 下安装更新版本的 Python,其中包含一些额外的软件包并保持系统版本正常工作。
我设法通过以下方式安装了 Python 2.7:
yum groupinstall -y development
yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel
wget https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar xzf Python-2.7.6.tgz
cd Python-2.7.6
./configure --prefix=/usr/local
make
sudo make alt install
如果我跑,python
我会得到Python 2.6.6
并python2.7
给我Python 2.7.6
。Yum 似乎也可以正常工作,所以我想我没有破坏系统。
现在,我的问题是,我需要在 Python 2.7 上安装 Twistd,它zope.interface
也需要。
如何在 Python 2.7 安装中同时安装它们/usr/local
?
另外,在那之后,如果我想为一个 twistd 插件运行设置并在 python 2.7 下运行它,我应该怎么做?
谢谢你。