Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Windows 10, Cygwin, python 3, Oracle client... DatabaseError: DPI-1047

user4565183Oct 31 2019 — edited Oct 31 2019

When I did a search for these key words: "Cygwin, Python, Oracle client", I got a suggested "Did you mean CGI?" ...so I apologize if this is a duplicate question (as I'm sure it is). If I'm in the wrong group/forum, please help me find the right place.

TL;DR: is there a current document / web page / video / article that describes how to set up on Windows 10, Cygwin with python 3 (cx_Oracle) client?

I *have* to think this has been asked before.... I'm hoping some forum regular will say, "Oh yea, you want this document"

Between the mis-information and the out-dated information and the versioning of both Cygwin/Python and Oracle, I simply cannot get this to work. Cygwin is difficult to uninstall so starting fresh is not really an option, I need to "fix" this.

Here's the breakdown:

I have Windows 10 Pro

On my desktop, I have dbeaver installed and connecting, using the ojdbc8.jar under a 'oreclient' directory.

I have Cygwin installed (it's not my choice)

$ cygcheck -V

cygcheck (cygwin) 3.0.7

System Checker for Cygwin

Copyright (C) 1998 - 2019 Cygwin Authors

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Using the Cygwin installer, I chose/installed Python3 (3.6.8-1)...

I also have python installed on my local machine (because I develop in python, duh), but I think this might be my first problem. Cygwin doesn't find it's own version and finds the local install Python3.7

$ which python

/cygdrive/c/Python37/python

Using pip (in Cygwin), I installed the cx_Oracle package. I can import it but when I try to make a connection, I get the following error (credential details have been obfuscated).

$ python -i

Python 3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> import cx_Oracle

>>> con = cx_Oracle.connect('username/password@servername:1523/database')

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

cx_Oracle.DatabaseError: DPI-1047: Cannot locate a 32-bit Oracle Client library: "The specified module could not be found". See https://oracle.github.io/odpi/doc/installation.html#windows for help

>>>

Yes, I did follow the link to github... the first thing it suggests is that I need Visual Studio for one library file. I can install VS (I have a license) but then I have to hand this off to Operations and they will NOT have VS, so there has to be something else. I find it hard to believe that Larry Ellison would force Windows users to install a bloated MicroSoft IDE, just to be able to make a client connection (plus it already works using dbeaver).

I don't know if that's enough for some brilliant Cygwin/Python/Oracle developer to answer my question ... so, hit me up for more details.

TIA

Chris -the DW worker bee

Comments
Post Details
Added on Oct 31 2019
2 comments
1,624 views