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?
cx_Oracle is a Python extension module that enables access to Oracle Database. It conforms to the Python database API 2.0 specification with a considerable number of additions and a couple of exclusions. cx_Oracle 8.3 was tested with Python versions 3.6 through 3.10.
Using cx_Oracle requires Oracle Client libraries to be installed. These provide the necessary network connectivity allowing cx_Oracle to access an Oracle Database instance. Oracle Client versions 19, 18, 12 and 11.2 are supported.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With