0

I have been using Python 2.7 so far on my Windows 10 machine. Now I need to migrate towards Python3.6, but I need to run both versions in parallel for quite a while until all old scripts have been converted to Python3. From the Python3 documentation, I gather that this should be possible.

I have installed both versions, which seems to have worked, and Hello World etc. works fine on both.

Now, one of the modules I routinely work with is cx_Oracle, and even though I have installed it for Python3, it does not seem to work. (I have installed both Python and cx_Oracle from .exe installers, both are 32 bit versions, just like the old Python2.7 (under which cx_Oracle works just fine).

import cx_Oracle

gives me

ImportError: DLL load failed: Procedure not found

I have adjusted PATH to contain both Python27 and Python3, and I have rebooted.

Can anyone tell me how to solve this? Does the Python3 version need its own Oracle Instant Client or something?

Edit: I have installed cx_Oracle cx_Oracle-6.0b1-cp36-cp36m-win32 using pip, without errors, and rebooted again.

Now cx_Oracle works from within Eclipse PyDev but when I call the same script from IDLE, I get ''ModuleNotFoundError: No module named 'cx_Oracle''' ???

CodingCat
  • 4,999
  • 10
  • 37
  • 59
  • you need oracle client for python3 which should be greater than 6 and oracle 11i or greater to use it – Exprator May 16 '17 at 12:07
  • Have you set the `ORACLE_HOME ` environment variable to point to your InstantClient folder? You'll also need to add the InstantClient folder to your `PATH`env variable. Make sure it's the first folder. See [this answer](http://stackoverflow.com/a/24889483/3165737) as well. – DocZerø May 16 '17 at 13:46
  • Why does this need to be specified for Python3 but not for Python2? – CodingCat May 16 '17 at 14:19
  • I have set these, and it still doesn't work. (Instant Client version 11.2, cx_Oracle version 5.3.12) – CodingCat May 16 '17 at 15:02

0 Answers0