oracle / python-cx_Oracle

Python interface to Oracle Database now superseded by python-oracledb
https://oracle.github.io/python-cx_Oracle
Other
888 stars 361 forks source link

Unable to install cx-oracle in MacOS Mojave (v10.14.3) #272

Closed akhilputhiry closed 5 years ago

akhilputhiry commented 5 years ago

Operating system - macOS Mojave version 10.14.3 Python - Python 3.6.0 PIP version - 19.0.3 Apple LLVM version - 10.0.0 (clang-1000.10.44.4) Target - x86_64-apple-darwin18.2.0 Thread model - posix

Collecting cx-oracle
  Using cached https://files.pythonhosted.org/packages/79/a3/d8a987fd9af0bea22cd56d6db44ccb9e5ef680e46f562bd9fedeed08ab98/cx_Oracle-7.1.1.tar.gz
Building wheels for collected packages: cx-oracle
  Building wheel for cx-oracle (setup.py): started
  Building wheel for cx-oracle (setup.py): finished with status 'error'
  Complete output from command /Users/akhillawrence/dev/datalab-notebook-backend/env/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p0/v891g23d3qzc2zd30smkh00c0000gn/T/pip-install-7g9ho7o8/cx-oracle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/p0/v891g23d3qzc2zd30smkh00c0000gn/T/pip-wheel-zh98ocfg --python-tag cp36:
  running bdist_wheel
  running build
  running build_ext
  building 'cx_Oracle' extension
  creating build
  creating build/temp.macosx-10.13-x86_64-3.6
  creating build/temp.macosx-10.13-x86_64-3.6/src
  creating build/temp.macosx-10.13-x86_64-3.6/odpi
  creating build/temp.macosx-10.13-x86_64-3.6/odpi/src
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DCXO_BUILD_VERSION=7.1.1 -Iodpi/include -Iodpi/src -I/Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m -c src/cxoBuffer.c -o build/temp.macosx-10.13-x86_64-3.6/src/cxoBuffer.o
  In file included from src/cxoBuffer.c:17:
  In file included from src/cxoModule.h:12:
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:7:10: error: expected "FILENAME" or <FILENAME>
  #include 'patchlevel.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:8:10: error: expected "FILENAME" or <FILENAME>
  #include 'pyconfig.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:9:10: error: expected "FILENAME" or <FILENAME>
  #include 'pymacconfig.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:50:10: error: expected "FILENAME" or <FILENAME>
  #include 'pyport.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:51:10: error: expected "FILENAME" or <FILENAME>
  #include 'pymacro.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:53:10: error: expected "FILENAME" or <FILENAME>
  #include 'pyatomic.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:64:10: error: expected "FILENAME" or <FILENAME>
  #include 'pymath.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:65:10: error: expected "FILENAME" or <FILENAME>
  #include 'pytime.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:66:10: error: expected "FILENAME" or <FILENAME>
  #include 'pymem.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:68:10: error: expected "FILENAME" or <FILENAME>
  #include 'object.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:69:10: error: expected "FILENAME" or <FILENAME>
  #include 'objimpl.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:70:10: error: expected "FILENAME" or <FILENAME>
  #include 'typeslots.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:71:10: error: expected "FILENAME" or <FILENAME>
  #include 'pyhash.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:73:10: error: expected "FILENAME" or <FILENAME>
  #include 'pydebug.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:75:10: error: expected "FILENAME" or <FILENAME>
  #include 'bytearrayobject.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:76:10: error: expected "FILENAME" or <FILENAME>
  #include 'bytesobject.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:77:10: error: expected "FILENAME" or <FILENAME>
  #include 'unicodeobject.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:78:10: error: expected "FILENAME" or <FILENAME>
  #include 'longobject.h'
           ^
  /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:79:10: error: expected "FILENAME" or <FILENAME>
  #include 'longintrepr.h'
           ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  error: command 'clang' failed with exit status 1

  ----------------------------------------
  Failed building wheel for cx-oracle
  Running setup.py clean for cx-oracle
Failed to build cx-oracle
Installing collected packages: cx-oracle
  Running setup.py install for cx-oracle: started
    Running setup.py install for cx-oracle: finished with status 'error'
    Complete output from command /Users/akhillawrence/dev/datalab-notebook-backend/env/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p0/v891g23d3qzc2zd30smkh00c0000gn/T/pip-install-7g9ho7o8/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 /private/var/folders/p0/v891g23d3qzc2zd30smkh00c0000gn/T/pip-record-nikv5cz4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/akhillawrence/dev/datalab-notebook-backend/env/include/site/python3.6/cx-oracle:
    running install
    running build
    running build_ext
    building 'cx_Oracle' extension
    creating build
    creating build/temp.macosx-10.13-x86_64-3.6
    creating build/temp.macosx-10.13-x86_64-3.6/src
    creating build/temp.macosx-10.13-x86_64-3.6/odpi
    creating build/temp.macosx-10.13-x86_64-3.6/odpi/src
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DCXO_BUILD_VERSION=7.1.1 -Iodpi/include -Iodpi/src -I/Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m -c src/cxoBuffer.c -o build/temp.macosx-10.13-x86_64-3.6/src/cxoBuffer.o
    In file included from src/cxoBuffer.c:17:
    In file included from src/cxoModule.h:12:
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:7:10: error: expected "FILENAME" or <FILENAME>
    #include 'patchlevel.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:8:10: error: expected "FILENAME" or <FILENAME>
    #include 'pyconfig.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:9:10: error: expected "FILENAME" or <FILENAME>
    #include 'pymacconfig.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:50:10: error: expected "FILENAME" or <FILENAME>
    #include 'pyport.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:51:10: error: expected "FILENAME" or <FILENAME>
    #include 'pymacro.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:53:10: error: expected "FILENAME" or <FILENAME>
    #include 'pyatomic.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:64:10: error: expected "FILENAME" or <FILENAME>
    #include 'pymath.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:65:10: error: expected "FILENAME" or <FILENAME>
    #include 'pytime.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:66:10: error: expected "FILENAME" or <FILENAME>
    #include 'pymem.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:68:10: error: expected "FILENAME" or <FILENAME>
    #include 'object.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:69:10: error: expected "FILENAME" or <FILENAME>
    #include 'objimpl.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:70:10: error: expected "FILENAME" or <FILENAME>
    #include 'typeslots.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:71:10: error: expected "FILENAME" or <FILENAME>
    #include 'pyhash.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:73:10: error: expected "FILENAME" or <FILENAME>
    #include 'pydebug.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:75:10: error: expected "FILENAME" or <FILENAME>
    #include 'bytearrayobject.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:76:10: error: expected "FILENAME" or <FILENAME>
    #include 'bytesobject.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:77:10: error: expected "FILENAME" or <FILENAME>
    #include 'unicodeobject.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:78:10: error: expected "FILENAME" or <FILENAME>
    #include 'longobject.h'
             ^
    /Users/akhillawrence/.pyenv/versions/3.6.0/include/python3.6m/Python.h:79:10: error: expected "FILENAME" or <FILENAME>
    #include 'longintrepr.h'
             ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    error: command 'clang' failed with exit status 1

    ----------------------------------------
Command "/Users/akhillawrence/dev/datalab-notebook-backend/env/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/p0/v891g23d3qzc2zd30smkh00c0000gn/T/pip-install-7g9ho7o8/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 /private/var/folders/p0/v891g23d3qzc2zd30smkh00c0000gn/T/pip-record-nikv5cz4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/akhillawrence/dev/datalab-notebook-backend/env/include/site/python3.6/cx-oracle" failed with error code 1 in /private/var/folders/p0/v891g23d3qzc2zd30smkh00c0000gn/T/pip-install-7g9ho7o8/cx-oracle/
cjbj commented 5 years ago

I only have broad suggestions, since I'm still on High Sierra and have not seen this.

akhilputhiry commented 5 years ago

@cjbj Thank you

I just noticed the single qoute in python. It looks like somehow my python files got messed up. I reinstalled python and its working now. Closing the issue for now.