0
votes

i am trying to connect my oracle 11g database to django but it didn't connect it show some error like

return Database.connect( django.db.utils.DatabaseError: DPI-1047: Cannot locate a 32-bit Oracle Client library: "C:\oraclexe\app\oracle\product\11.2.0\server\bin\oci.dll is not the correct architecture". See https://cx-oracle.readthedocs.io/en/latest/user_guide/installation.html for help

i sucessfully install 32 bit oracle client library but it still shows same error.

i am new to django and this error pops up when i use command python manage.py makemigrations it didn't create migration instead it shows this error. it would be pleasure if someone helps me. thankyou :)

1
is your python interpreter 32 or 64 bit? how to test it - Petr
take a look at your PATH system variable. If there are entries for both 32-bit and 64-bit oracle client, which comes first? - EdStevens

1 Answers

0
votes

The error is because you have a 64-bit Oracle Database installed, and its libraries are first in PATH so Python cx_Oracle tries to load them. Unfortunately your Python is 32-bit so there is a clash, which is shown by the error.

You choices are to set PATH to have your 32-bit Oracle client libraries first when you run Python. You probably don't want to do this globally since that might affect other Oracle DB tools, so you would need to do it in a cmd terminal, or set up a script that sets PATH and then calls python. You would call your new script anytime you wanted to run Python.

Overall, it's probably easier to uninstall Python, and install a 64-bit Python.