title: Cannot connect to ODBC from Python Error: file not found (0) (SQLDriverConnect)")
body: <p>I am trying to connect to oracle database using Python on the Linux server by <code>pyodbc</code> driver. but I am getting below error:</p>
  
  <pre><code> File "Query.py", line 20, in &lt;module&gt;
      connection = pyodbc.connect('Driver=/usr/lib/oracle/18.3/client64/lib/libsqo                                                                                                                     ra.so.18.1};DBQ=bnpporacleb.chwk19l2i1ki.ap-southeast-1.rds.amazonaws.com/ORCL;U                                                                                                                     id=admin;Pwd=12341234')
  pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/usr/                                                                                                                     lib/oracle/18.3/client64/lib/libsqora.so.18.1}' : file not found (0) (SQLDriverC                                                                                                                     onnect)")
  </code></pre>
  
  <p>I also tried making entry in the <code>odbcinst.ini</code>:</p>
  
  <pre><code>[MyOracle]
  Description=Oracle Unicode driver
  Driver=/usr/lib/oracle/18.3/client64/lib/libsqora.so.18.1
  UsageCount=1
  </code></pre>
  
  <p>But got error:</p>
  
  <pre><code>File "Query.py", line 19, in &lt;module&gt;
      connection = pyodbc.connect('Driver=MyOracle};DBQ=xxxxx/ORCL;Uid=admin;Pwd=12341234')
  pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'MyOracle}' : file not found (0) (SQLDriverConnect)")
  FileUsage=1
  </code></pre>
  
  <p>Below dltest comand is working fine.</p>
  
  <pre><code>[root@ip-172-31-33-62 lib]# dltest /usr/lib/oracle/18.3/client64/lib/libsqora.so.18.1
  SUCCESS: Loaded /usr/lib/oracle/18.3/client64/lib/libsqora.so.18.1
  </code></pre>
  
  <p>Also, below commands gives mentioned output:</p>
  
  <pre><code>[root@ip-172-31-33-62 etc]# python -c "import pyodbc; print(pyodbc.connect('DRIVER=MyOracle;DBQ=XXXXX/ORCL;UID=admin;PWD=12341234'))"
  &lt;pyodbc.Connection object at 0x7fba233664e0&gt;
  </code></pre>