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

cannot find dpi.h #19

Closed jc4000 closed 7 years ago

jc4000 commented 7 years ago

Delete irrelevant parts of this template.

For general questions:

Trying to build and install cx_Oracle in mac OS X 10.11.6 El Capiton 64 bit version according to the instructions http://www.cs.utexas.edu/~mitra/csSpring2012/cs327/cx_mac.html

Getting "src/cx_Oracle.c:21:10: fatal error: 'dpi.h' file not found"

when executing "$python setup.py build".

This is the last include statement in the file "cx_Oracle.c" in the "src" directory.

  1. Have tried with Anaconda python 3
  2. Then thought that it might be issue with python3 and tried with Anaconda python 2.
  3. Still did not work. So tried with the version python 2.7.10 available through OS X
cjbj commented 7 years ago

Useful questions from the template:

  1. What is your version of cx_Oracle?

I can guess, but I shouldn't have to....

  1. What is your version of the Oracle client (e.g. Instant Client)? How was it installed? Where is it installed?

Also check out: https://oracle.github.io/odpi/doc/installation.html#macos

anthony-tuininga commented 7 years ago

How did you get the source? If from a github clone, you need to make sure you run these commands after the clone of cx_Oracle is complete:

git submodule init
git submodule update

That will get you the source for ODPI-C which is a necessary part of cx_Oracle 6 -- which I assume is what you are using!

jc4000 commented 7 years ago

Got resolved. Had downloaded the master as a zip file that's where the problem was happening. Downloaded the version 5.3 and everything worked. Thanks for asking those questions. It helped a lot.

anthony-tuininga commented 7 years ago

Glad those questions helped. You can get the source directly from [PyPI][https://pypi.python.org/pypi/cx_Oracle] which will contain everything required to build. GitHub does not include submodules in its tarball. In that case you do need to git clone, not simply download a tarball.