Fixing Oracle DPI-1047 error – Cannot locate a 64-bit Oracle Client library

cannot locate a 64-bit oracle client library: “the specified module could not be found” is an error which occurs when one or more Oracle Client libraries are not installed properly.

Today I try to explain why this error takes place and how to solve it, I will also add other solutions that could solve the error if possible.

Exploring Oracle DPI-1047 error – Cannot locate a 64-bit Oracle Client library

This is an error which occurs when you do not properly install an oracle client library.

Your error message should match the one bellow. We want to avoid confusion by not mixing between error messages.

Fixing Oracle DPI-1047 error – Cannot locate a 64-bit Oracle Client library

Bellow is a number of tested solutions that I have tried and that have worked for me.

Solution 1 : install Python-oracledb instead

I explained to you guys the fact that the error is the result of a cx_Oracle library which is not properly installed.

In order to avoid this problem for good and avoid any other cx_Oracle library related problem that might arise in the future, the best thing to do is to use Python-oracledb which is the new name for the popular cx_Oracle driver.

By default Python-oracledb doesn’t need Oracle Client libraries so you can use it on many platforms, even on some that don’t have Oracle Client libraries available.

You can install it using pip just like this.

Fixing Oracle DPI-1047 error – Cannot locate a 64-bit Oracle Client library-1

After you do this, I do want to say I can guarantee you … but I think the error should be gone for most people, if that is not the case I still have an amazing method that could work for you.

Solution 2 : use the dll files from the 64-bit version of oracle instantClient

The second solution is to download the 64-bit version of oracle instantClient.

Once you do that you should select all the dll files in the directory Copy them and then past them to the python directory located in program files.

You do not have to do anything else, the error should be gone on the next run of your code.

If the solutions above helped you, consider supporting us on Kofi, any help is appreciated.

Summing-up : 

That’s it fellow developers, this is the end of this guide, I hope you found this useful in solving the error : cannot locate a 64-bit oracle client library: “the specified module could not be found” , if you have the means and want to help, please support our work on our Kofi account, you do not have to, but you can donate if you want.

Thank you, keep coding and cheers. If you want to learn more about Python, please check out the Python Documentation : https://docs.python.org/3/