在生产环境的机器上(操作系统为suse),想要使用python做一些工作,随系统安装的python版本为2.6,且相应的包也不全,编译cx_ORACLE时报错,“无法找到Python.h”,想想还是自己再安装一个开发版本的吧。
说干就干,等等,有没有root用户?问了一下infra组,由于主机已经交维,root用户权限被收回,无奈只能使用应用的用户来尝试安装,首先下载Python 2 系列最新的版本2.7.13源码包,下载地址为:
https://www.python.org/downloads/release/python-2713/
文件下载后,在用户的目录下解压,在编译之前先执行下configure –help看看:
`configure' configures python 2.7 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit