FW: anaconda python 3.5 + windows 7 + cx_Oracle 5.2?

"Codiga, Daniel" <[email protected]> Mon, 14 Nov 2016 15:35:10 +0000
Newsgroups gmane.comp.python.db.cx-oracle
Message-ID <[email protected]>
Ok... to wrap this up now. I have it working.
I found https://anaconda.org/dhirschfeld/cx_oracle and added that channel to my environment.yml file, with the cx_Oracle dependency. (That's easier and seems more efficient than doing the installation on my machine myself using what I found at https://pypi.python.org/pypi/cx_Oracle/5.2.1 .)

Now, conda finds and installs cx_Oracle 5.2.1 with python 3.5, instead of giving me the conflict error. So I'm no longer limited to using python 3.4.

Note that using this additional channel is a workaround, because conda-forge doesn't yet include cx_Oracle 5.2.1-a colleague indicates adding it to conda-forge is in the works.

So I am all set for now. Thank you for your help and suggestions.




From: Codiga, Daniel
Sent: Wednesday, November 09, 2016 3:18 PM
To: 'cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org'
Subject: RE: anaconda python 3.5 + windows 7 + cx_Oracle 5.2?

Thanks for the suggestions. An update now.

Because I was not the person who configured my PC for the existing cx_Oracle 5.1.2 that I have used successfully in Python 2.7, I did not realize there was more to installing/configuring it than just including cx_Oracle in my environment.yml file; the latter step I had done but the other steps prior to that were done by others.

Now, I have learned that to get this working I need to have (at least) these elements in place with the properly aligned versions:

a.      Python

b.      cx_Oracle

c.      The client/driver version
... and that I need to put that final one on to the path.

( Is there a good set of step by step instructions for how to do this? If so please point me to it. I did a lot of searching around and found lots specifically about cx_Oracle's functionality, but not so much-basically some third-party blog posts-- in terms of the needed steps to fully install/configure all the elements needed to get it working. )

So... my Oracle version is 11g (11.2.0.4.0) and I downloaded the instantclient_11_2 from the Oracle website and added it to my path. Now, when I create an anaconda environment with python=3.4 and include cx_Oracle in it, all goes well, and I can successfully open a connection to the database-within that new environment, in Python 3.4.5. So that is progress for sure.

I would ideally be able to do this in Python 3.5 as well as 3.4 though. And when I try (by creating an environment using python=3.5 and including cx_Oracle as a dependency in environment.yml) I still get the "specifications were found to be in conflict" error ( " - cx_oracle -> python 2.7*|3.4* and - python 3.5* "), just like before, and the environment does not get created successfully.

Does this mean I have to install cx_Oracle (i.e. part b above) myself-- instead of (or in addition to) asking for it to be included as a dependency in my environment.yml file and hoping conda will find and install the proper version?

When I do "conda info cx_Oracle" I get listings for:

cx_oracle 5.1.2 py2.7_0
cx_oracle 5.1.2 py2.7_1
cx_oracle 5.2 py3.4

but py3.5 is not included. So it seemed like maybe I needed to download and install cx_Oracle from https://pypi.python.org/pypi/cx_Oracle/5.2.1 ?

If so, it seems like Anaconda is not able to find and install 3.5 for me as part of an environment.

Suggestions, advice?

From: Codiga, Daniel
Sent: Tuesday, November 08, 2016 11:14 AM
To: 'cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org'
Subject: RE: anaconda python 3.5 + windows 7 + cx_Oracle 5.2?

To be a little more complete regarding my final comment, ...

When I create the environment using python 3.4, it appears that cx_Oracle 5.2 has been installed successfully (according to Anaconda Navigator, at least). Then when I try "import cx_Oracle" the problem is not exactly that it can't find the win32 file; the error message is this:

ImportError: DLL load failed: %1 is not a valid Win32 application.



From: Codiga, Daniel
Sent: Monday, November 07, 2016 3:55 PM
To: 'cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org'
Subject: anaconda python 3.5 + windows 7 + cx_Oracle 5.2?

>From what I have read in the documentation, it looks like I should be able to install anaconda python 3.5 on my windows 7 64-bit PC and include cx_Oracle 5.2 in a conda virtual environment.

However I am encountering problems in trying.

( Previously I was using Anaconda python 2.7 with cx_Oracle 5.1.2 in a conda environment without trouble. I mention this because it seems possible that my problems are associated with not fully/successfully uninstalling cx_Oracle 5.1.2? Just a thought.)

Anyway I do a clean wipe of python from my system and then install Miniconda (64 bit windows) and all is well. I then try to create an environment "conda env create environment.yml" -- with "python=3.5" and "cx_Oracle" both listed as dependencies in the environment.yml file-- and get the "specifications were found to be in conflict" error. It says " - cx_oracle -> python 2.7*|3.4*" and " - python 3.5*".

So then, to troubleshoot a little, I try same but with "python=3.4" in the environment.yml file. The environment gets created ok. But when I try "import cx_Oracle" I get an error saying it couldn't find the win32 file.

Suggestions?

------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi

_______________________________________________
cx-oracle-users mailing list
cx-oracle-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/cx-oracle-users