linux-python2.x:安装cx_Oracle包:从最初、最原始的发行版状态:不依赖pip(Linux-python2. X: installing CX_ Oracle package: from the initial and original release status: independent of Pip)

背景:

  生产系统的linux发行版比较老旧:只有python 2.x;甚至都没有安装pip;更甚者,没有internet!

目标:

  安装cx_Oracle模块,以便操作oracle进行查询…

研究方向:

  1)先安装pip,再通过pip安装cx_Oracle

  2)直接安装cx_Oracle

成果:

  方向 1)成功了。但是路途绕的比较远,虽然符合绝大部分人的直观意识

  方向2)也成功了。而且更简单、直接。

展示(方向2):

  发行版(rhel6系列)——是经典版本;且python比较老。具有典型展示意义。

  step 1:安装gcc、libc-devel、make

  step 2:确保系统安装python(python2.6)——这个要求已经很低很低了!

  step 3:下载cx_Oracle的【源码】包,最后的python2版本为7.3.0。特别高、特别低的版本都有其自身要求,不要较劲!

  step 4:解压cx_Oracle后,进入该包(cd),执行:python setup.py install

祝你好运

————————

Background:

The Linux distribution of the production system is old: only Python 2. X; Pip is not even installed; What’s more, there is no Internet!

Objectives:

Installing CX_ Oracle module to operate Oracle for query

Research direction:

1) install PIP first, and then install CX through pip_ Oracle

2) direct installation Cx_ Oracle

achievements:

Direction 1) successful. But the journey is far away, although it is in line with the intuitive consciousness of most people

Direction 2) also succeeded. And more simple and direct.

Presentation (direction 2):

Distribution (rhel6 Series) – it is a classic version; And Python is old. It has typical display significance.

Step 1: install GCC, libc devel, and make

Step 2: make sure that python (python2.6) is installed on the system — this requirement is very low!

Step 3: Download CX_ Oracle’s [source code] package, and the final Python 2 version is 7.3.0. Especially high and low versions have their own requirements. Don’t compete!

Step 4: unzip CX_ After Oracle, enter the package (CD) and execute Python setup.py install

Good luck