简体   繁体   English

在没有安装gcc的情况下安装python 2.7

[英]Install python 2.7 with no gcc installed

I have a CentOS 6.5 server with python 2.6 and a restriction on updating kernel. 我有一台具有python 2.6的CentOS 6.5服务器,并且对更新内核有限制。 I need to configure virtualenv for a django 1.8 project to run. 我需要为运行的django 1.8项目配置virtualenv。

As soon as django 1.8 works at least with python 2.7, I need it to be installed also. django 1.8至少可以在python 2.7上运行,我也需要安装它。 Installation of python requires gcc to compile python binaries. 安装python需要gcc来编译python二进制文件。 When I try to install gcc with yum install gcc , I get following errors: 当我尝试使用yum install gcc ,出现以下错误:

Error: Package: glibc-headers-2.12-1.166.el6_7.3.x86_64 (updates)
       Requires: kernel-headers >= 2.2.1
Error: Package: glibc-headers-2.12-1.166.el6_7.3.x86_64 (updates)
       Requires: kernel-headers

Is there any other way to install python without gcc and not updating kernel? 还有其他没有gcc且不更新内核的安装python的方法吗? I can't do it due to other soft requirements. 由于其他软性要求,我无法执行此操作。

Thank you. 谢谢。

Install a compatible CentOS 6.5 on another computer. 在另一台计算机上安装兼容的CentOS 6.5。 Install all necessary packages to develop Python 2.7. 安装所有必需的软件包以开发Python 2.7。

Compile Python there. 在那里编译Python。

Copy the compiled tree to the original server. 将编译的树复制到原始服务器。

Run make install . 运行make install

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在安装了python 2.7的Mac上安装pygame? - How to install pygame on Mac with python 2.7 installed? 如何为python 2.7安装sqlite3(如果默认未安装) - How to install sqlite3 for python 2.7 ( if not installed by default ) 无法安装 Django 版本 1.11.22 和 windows 10 上安装的 python 2.7 - Unable to install Django Version 1.11.22 with python 2.7 installed on windows 10 Python 3 已安装且无法安装 MySQLdb 由于 2.7 deprecation 错误 - Python 3 installed and unable to install MySQLdb due to 2.7 deprecation error 在Python 3.4上安装了Scrapy(不兼容),安装了Python 2.7并且无法安装Scrapy for Python 2 - Installed Scrapy on Python 3.4 (not compatible), installed Python 2.7 and can't install Scrapy for Python 2 Flask是为Python 2.7而非Python 3安装的 - Flask is installed for Python 2.7 and not for Python 3 我无法安装numpy,因为它找不到python 2.7,虽然我已经安装了python - I cannot install numpy because it can't find python 2.7, althought I have installed python 使用“Conda install”安装了 Python 3.6,无法运行旧的 2.7 python 程序 - Installed Python 3.6 using 'Conda install', unable to run old 2.7 python programs 当它们安装在python2.7中时,如何为python3.x安装Numpy和pip3? 使用Conda吗? - How to install Numpy & pip3 for python3.x when they were installed in python2.7? Using Conda? 如何在还安装了Python 3.4的情况下为Python 2.7安装BeautifulSoup4? - How to install BeautifulSoup4 for Python 2.7 while also having Python 3.4 installed?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM