![]() ![]() opt/local/lib/libgmp.10.dylib (compatibility version 15.0.0, current version 15.1.0) opt/local/lib/libnettle.8.dylib (compatibility version 8.0.0, current version 8.6.0) ![]() opt/local/lib/libgnutls.30.dylib (compatibility version 59.0.0, current version 59.2.0) opt/local/lib/libgssapi_krb5.2.2.dylib (compatibility version 2.0.0, current version 2.2.0) opt/local/lib/libhogweed.6.dylib (compatibility version 6.0.0, current version 6.6.0) opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0) opt/local/lib/libodbcinst.2.dylib (compatibility version 3.0.0, current version 3.0.0) opt/local/lib/libodbc.2.dylib (compatibility version 3.0.0, current version 3.0.0) Here's the output of otool -L /opt/local/lib/libtdsodbc.so: /opt/local/lib/libtdsodbc.so: I tried using both the macports and brew guides mentioned above. '01000', " Can't open lib '/opt/local/lib/libtdsodbc.so' : file not found (0) (SQLDriverConnect)" I have linked the driver in the odbc configuration. Then run the following command to install: > python install I am running into the same problem:Īfter running the python command nnect('DRIVER=FreeTDS SERVER=localhost DATABASE=mydb UID=myuser PWD=mypassword'), I get the following error. Find the following lines (146-147): elif sys.platform = 'darwin':Īnd change this line: settings.append('iodbc') Download the source package and extract it somewhere. Follow these steps only to install the old version. Note that the current version of writing (3.0.10) doesn't have this issue. Version 3.0.7 didn't link with unixODBC on OS X, so a change had to be made to setup.py. Reference - Installing pyodbc version 3.0.7 and before Note that you could also link to the library file of FreeTDS instead of using odbcinst.ini, like this: nnect('DRIVER=/usr/local/lib/libtdsodbc.so SERVER= PORT=1433 DATABASE= UID= PWD=') You probably want to select a database on connect, so change your connect line to read: nnect('DRIVER=FreeTDS SERVER= PORT=1433 DATABASE= UID= PWD=') You don't need to have your DSN configured in odbc.ini, so clear that file. The current version (3.0.10) has resolve this issue, so you can go ahead and install from pypi: pip install pyodbc Version 3.0.7 and before didn't link with unixODBC, so a change had to be made to setup.py, follow the steps at the bottom instead. If the test succeeded, you can continue onto installing the Python library pyodbc. Now, run the test command: $ isql MYDSN -v The above worked for me for SQL Server 2008 R2. The configuration for your DNS might vary, you might need the TDS_Version or Servername directives. The test command we're using requires configuring a DSN, so edit /usr/local/etc/odbc.ini: Onto unixODBC, we need to link to the driver, edit /usr/local/etc/odbcinst.ini: First, install the following libraries: $ brew install unixodbcįreeTDS should already work now, without configuration: $ tsql -S -U -P
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |