6

I need to connect to Oracle database in Python Anaconda3-2.5.0-Windows-x86_64. Installation of the cx_Oracle module by:

conda install -c https://conda.anaconda.org/anaconda cx_oracle

fails with following output (trimmed):

Hint: the following packages conflict with each other:
  - cx_oracle
  - python 3.5*

So I tried to install package for Python 3.5 by 'cx_Oracle-5.2.1-11g.win-amd64-py3.5.exe' from https://pypi.python.org/pypi/cx_Oracle/ Which seems to be working (somehow). Even 'conda list' command prints line:

cx-oracle                 5.2.1                     <pip>

But when I enter import cx_Oracle; in Python then

ImportError: DLL load failed: Uvedený modul nebyl nalezen.

appears. Rough translation of last localized part is 'Modul not found.'

How can I install the cx_Oracle module? Or is there any other way to connect to Oracle database?

plastique
  • 1,164
  • 2
  • 9
  • 19

5 Answers5

3

I'm assuming that you have windows and python 3.5 only installed. Check your anaconda just incase to make sure you are using anaconda3 or that anaconda is setup with python3 environment. Assuming all that checks out and you are still getting that same error try doing a fresh install of cx_oracle from pip.

On your windows machine open up cmd and type pip install cx_Oracle and it should install nicely. If you by chance have python2 installed as well you might want to do python3 -m pip install cx_Oracle. After installation completes you should be good to go.

Seekheart
  • 1,135
  • 7
  • 8
  • Hello, I have only one installation of python and it is anaconda3 with python 3.5. Running 'pip install cx_Oracle' will end with following error: running bdist_wheel running build running build_ext building 'cx_Oracle' extension error: Unable to find vcvarsall.bat ---------------------------------------- Failed building wheel for cx-Oracle – plastique Mar 01 '16 at 15:32
  • please have a look at [this](http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat) – Seekheart Mar 01 '16 at 16:05
1

In the Anaconda navigator, select 'Environments', then on the right, change the filter to 'All'. Now you can query for 'cx_oracle', select it and at the bottom, select 'Apply'. Once completed, you should be able to

import oracle
Beege
  • 665
  • 4
  • 18
0

Download a precompiled version of the package and install it using easy_install.

Phoenix87
  • 1,003
  • 11
  • 15
0

Easier way to load is to down load from the below link https://pypi.python.org/pypi/cx_Oracle/

and install it in Windows. It worked like a charm for me.

0

From https://anaconda.org/anaconda/cx_oracle

conda install -c anaconda cx_oracle
Raj Stha
  • 1,043
  • 11
  • 18