我试图通过pip在我的CentOS上的Python3.4.3中安装cx_oracle,但是失败了。
$ sudo pip3.4 install cx_oracle
Collecting cx-oracle
Using cached cx_Oracle-5.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-m0e47l0_/cx-oracle/setup.py", line 168, in <module>
instantClientRPMLib = FindInstantClientRPMLib()
File "/tmp/pip-build-m0e47l0_/cx-oracle/setup.py", line 130, in FindInstantClientRPMLib
versions.sort(key = lambda x: [int(s) for s in x.split(".")])
File "/tmp/pip-build-m0e47l0_/cx-oracle/setup.py", line 130, in <lambda>
versions.sort(key = lambda x: [int(s) for s in x.split(".")])
File "/tmp/pip-build-m0e47l0_/cx-oracle/setup.py", line 130, in <listcomp>
versions.sort(key = lambda x: [int(s) for s in x.split(".")])
ValueError: invalid literal for int() with base 10: '2_encryption_required'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-m0e47l0_/cx-oracle 有什么想法吗?
Setuptools已经是最新的:
$ sudo pip3.4 install --upgrade setuptools
Requirement already up-to-date: setuptools in /usr/lib/python3.4/site-packagesOracle客户端已安装,并可从PHP和其他应用程序轻松使用
$ echo $ORACLE_HOME
/usr/lib/oracle/11.2/client64
$ echo $LD_LIBRARY_PATH
/usr/lib/oracle/11.2/client64/lib发布于 2015-07-15 23:57:40
好吧,这个问题是由于在Oracle客户端上有一个'/usr/lib/oracle/11.2/client64/11.2_encryption_required‘文件夹引起的,其中强制要求加密。不幸的是,在Oracle客户端中,如果您希望对建立的某些连接使用加密,而不是对其他连接使用加密,则需要有一个单独的客户端。
似乎cx_oracle installes的FindInstantClientRPMLib没有准备好看到任何非数字值,所以它在"encryption_required“部分失败了。
我暂时重命名了文件夹,然后安装程序错误就消失了。
https://stackoverflow.com/questions/31433802
复制相似问题