V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
qinkun1234
V2EX  ›  Python

cx_Oracle 模块如何安装

  •  
  •   qinkun1234 · 2015-03-01 17:51:24 +08:00 · 4864 次点击
    这是一个创建于 3588 天前的主题,其中的信息可能已经有所发展或是发生改变。
    我参考这篇文章安装cx_Oracle模块 http://kevindalias.com/2014/03/26/how-to-set-up-cx_oracle-for-python-on-mac-os-x-10-89/

    控制台报如下错

    ➜ ~ pip install cx_Oracle --allow-external cx_Oracle --allow-unverified cx_Oracle
    Downloading/unpacking cx-Oracle
    Downloading cx_Oracle-5.1.3.tar.gz (104kB): 104kB downloaded
    Running setup.py (path:/private/var/folders/bh/yqy9l7cx5vd77ymkjhtyv8r40000gn/T/pip_build_qk/cx-Oracle/setup.py) egg_info for package cx-Oracle
    ^CCleaning up...
    Operation cancelled by user
    Storing debug log for failure in /Users/qk/.pip/pip.log
    ➜ ~ pip install cx_Oracle --allow-external cx_Oracle --allow-unverified cx_Oracle
    Downloading/unpacking cx-Oracle
    Downloading cx_Oracle-5.1.3.tar.gz (104kB): 104kB downloaded
    Running setup.py (path:/private/var/folders/bh/yqy9l7cx5vd77ymkjhtyv8r40000gn/T/pip_build_qk/cx-Oracle/setup.py) egg_info for package cx-Oracle
    Traceback (most recent call last):
    File "<string>", line 17, in <module>
    File "/private/var/folders/bh/yqy9l7cx5vd77ymkjhtyv8r40000gn/T/pip_build_qk/cx-Oracle/setup.py", line 135, in <module>
    raise DistutilsSetupError("cannot locate an Oracle software " \
    distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

    File "<string>", line 17, in <module>

    File "/private/var/folders/bh/yqy9l7cx5vd77ymkjhtyv8r40000gn/T/pip_build_qk/cx-Oracle/setup.py", line 135, in <module>

    raise DistutilsSetupError("cannot locate an Oracle software " \

    distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation

    ----------------------------------------
    Cleaning up...
    Command python setup.py egg_info failed with error code 1 in /private/var/folders/bh/yqy9l7cx5vd77ymkjhtyv8r40000gn/T/pip_build_qk/cx-Oracle
    Storing debug log for failure in /Users/qk/.pip/pip.log

    有谁碰到此类问题的,如何解决。
    2 条回复    2015-03-02 14:56:34 +08:00
    dawncold
        1
    dawncold  
       2015-03-01 18:07:34 +08:00
    感觉就和oracle_home没设置似的,在ubuntu下未遇到类似问题
    withrock
        2
    withrock  
       2015-03-02 14:56:34 +08:00
    ORACLE_BASE 、ORACLE_HOME这两个环境变量要配置
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3245 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 12:02 · PVG 20:02 · LAX 04:02 · JFK 07:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.