title: PyODBC : can't open the driver even if it exists
body: <p>I'm new to the linux world and I want to query a Microsoft SQL Server from Python. I used it on Windows and it was perfectly fine but in Linux it's quite painful.</p>
  
  <p>After some hours, I finally succeed to install the Microsoft ODBC driver on Linux Mint with unixODBC.</p>
  
  <p>Then, I set up an anaconda with python 3 environment. </p>
  
  <p>I then do this :</p>
  
  <pre><code>import pyodbc as odbc
  
  sql_PIM = odbc.connect("Driver={ODBC Driver 13 for SQL Server};Server=XXX;Database=YYY;Trusted_Connection=Yes")
  </code></pre>
  
  <p>It returns :</p>
  
  <pre><code>('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0' : file not found (0) (SQLDriverConnect)")
  </code></pre>
  
  <p>The thing I do not undertsand is that PyODBC seems to read the right filepath from odbcinst.ini and still does not work.</p>
  
  <p>I went to "/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0" and the file actually exists !</p>
  
  <p>So why does it tell me that it does not exist ?
  Here are some possible clues :</p>
  
  <ul>
  <li>I'm on a virtual environment</li>
  <li>I need to have "read" rights because it's a root filepath</li>
  </ul>
  
  <p>I do not know how to solve either of these problems.</p>
  
  <p>Thanks !</p>