如果出现下列错误有可能是因为x86的oracle客户端引起的:
error: command 'C:\\Users\\Administrator\\AppData\\Local\\Programs\\Common\\
Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\link.exe' failed with exi
t status 1120
Command "d:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\
\users\\admini~1\\appdata\\local\\temp\\pip-build-hgbxxk\\cx-Oracle\\setup.py';f
=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f
.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\admini
~1\appdata\local\temp\pip-zfk0bj-record\install-record.txt --single-version-exte
rnally-managed --compile" failed with error code 1 in c:\users\admini~1\appdata\
local\temp\pip-build-hgbxxk\cx-Oracle\
要使用cx_Oracle:原文链接
- you must install oracle client first
- make sure :win7 x64; python x64; oracle client x64
- pip install cx_Oracle
考虑本地安装的oracle是x86的,因此将python替换成32位版本的即可解决这个问题。