美文网首页我爱编程
python安装cx_Oracle报错:failed with

python安装cx_Oracle报错:failed with

作者: oldlie | 来源:发表于2017-01-13 16:38 被阅读927次

    如果出现下列错误有可能是因为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:原文链接

    1. you must install oracle client first
    2. make sure :win7 x64; python x64; oracle client x64
    3. pip install cx_Oracle

    考虑本地安装的oracle是x86的,因此将python替换成32位版本的即可解决这个问题。

    相关文章

      网友评论

        本文标题:python安装cx_Oracle报错:failed with

        本文链接:https://www.haomeiwen.com/subject/hcysbttx.html