title: cx_Oracle - DLL load failed
body: <p>I have a problem importing cx_Oracle with Python. I know a lot of issues with cx_Oracle have been discussed here, but it seems that I cannot find a solution to my problem after reading all the related topics.</p>
  
  <p>I have two machines, one is my computer and another one is a remote workstation, which have similar configs (Windows 7, 64-bits). I need to install cx_Oracle on the remote workstation but it does not work, whereas it works fine on my computer (I can import the module successfully and connect to my DB). On the remote workstation, I have the following error :</p>
  
  <pre><code>Traceback (most recent call last):
  File "&lt;pyshell#0&gt;", line 1, in &lt;module&gt;
    import cx_Oracle
  ImportError: DLL load failed: The specified module could not be found.
  </code></pre>
  
  <p>I have double-checked my environment variables, and I re-installed cx_Oracle a couple of times, but I cannot get it working... I did some research about this problem and I am kind of stuck here, I do not understand why it is working fine on my computer but not on this remote workstation (the only difference is that this remote workstation is a VM).</p>
  
  <p>Does anyone have an idea on what could be the issue?</p>
  
  <p>Running Dependancy Walker on both cx_oracle.pyd (on my computer where it works fine and on the remote workstation where cx_oracle does not work), the only difference are the dll MSVCR100 amd MSVCR90 which are not found on my remote workstation.</p>
  
  <p>I have the following environment variables setup:</p>
  
  <ul>
  <li><p><code>C:\Oracle as ORACLE_BASE</code></p></li>
  <li><p><code>C:\Oracle\instantclient_12_1</code> as ORACLE_HOME </p></li>
  <li><p><code>C:\Oracle\instantclient_12_1</code> added to the "Path" variable</p></li>
  </ul>
  
  <p>Both machines are 64-bit, Windows 7</p>
  
  <p>I am running Python 2.7.5 </p>
  
  <p>I unzipped instantclient-basic-nt-12.1.0.1.0 in <code>C:\Oracle\instantclient_12_1</code></p>
  
  <p>I installed <code>cx_Oracle-5.1.2-11g.win32-py2.7s</code> </p>
  
  <p>On the remote workstation, <code>sys.path</code> gives me :</p>
  
  <blockquote>
    <p>'C:\Python27\Lib\idlelib', 'C:\Windows\system32\python27.zip', 'C:\Python27\DLLs', 'C:\Python27\lib', 'C:\Python27\lib\plat-win', 'C:\Python27\lib\lib-tk', 'C:\Python27', 'C:\Python27\lib\site-packages'</p>
  </blockquote>
  
  <hr>
  
  <h2>EDIT 1</h2>
  
  <p>In the previous post, all files (Python 2.7, cx_Oracle package, Oracle Instant client) were for 32 bit systems.
  I downloaded the same version of those files for 64 bit systems and everything is working fine on my remote workstation now.</p>
  
  <h2>EDIT 2</h2>
  
  <p>Basically, the fix consisted for me in re-installing everything (Python, Oracle Instant Client and cx_Oracle) for 64-bit systems instead of 32-bit systems.</p>
  
  <p>To summarize, this was my problem and how it got fixed:
  1) I installed Cx_Oracle (from 32-bit windows installation package) and Oracle Instant Client (32-bit)  and it was working perfectly on my 64-bit system running python 2.7.5 for 32-bit systems
  2) I did the same thing exactly on a Virtual Machine (running a 64-bit system as well) and it was not working
  3) To get it working on the VM, I re-installed everything for 64-bit systems (python, Instant Client, Cx_Oracle) and it finally worked</p>
  
  <p><a href="http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html">http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html</a>
  <a href="http://sourceforge.net/projects/cx-oracle/files/5.1.2/">http://sourceforge.net/projects/cx-oracle/files/5.1.2/</a></p>
  
  <p>Also, Make sure to download the cx_Oracle and Instant client corresponding to your DB version (11g in my case).
  Hope this helps.</p>