Is there a free software to access Microsoft SQL Server database from Mac? One data client does not fit all, so TeamSQL is fully extensible. Install the extensions you need to create the data client that works best for you. And anything that uses FreeTDS (like the Python pymssql library) will work. There’s also Navicat, SQLPro for. Windows users: You need to download and install additional DLLs. Pymssql version 2.1.2 includes a change in the official Windows binaries: FreeTDS. Error message: clang -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/usr/local/var/pyenv/versions/2.7.11/include/python2.7 -c _mssql.c -o build/temp.macosx-10.11-x86_64-2.7/_mssql.o -DMSDBLIB _mssql.c:18783:15: error: use of undeclared identifier 'DBVERSION_80' __pyx_r = DBVERSION_80; ^ 1 error generated. Error: command 'clang' failed with exit status 1 Reverting to FreeTDS 0.91 via brew unlink freetds; brew install homebrew/versions/freetds091 fixes the issue as a work-around. Same issue on Ubuntu. Apparently the apt sources have linked free-tds 1.0 as the current stable version so pymssql stopped working. This is strange. Ubuntu (and Debian) are stuck on FreeTDS 0.91: • • There was a third party PPA with FreeTDS packages for Ubuntu which carried 0.95. IIRC it's this one: What APT repos are you using in order to get 1.0? BTW we are asking for testing/feedback on binary wheels for Linux we are publishing for the first time, which include static version of FreeTDS 0.95.x and we plan to release in the next few days as version 2.1.3 of pymssql. I work with macports. I had to do the following: • Remove installed older version of freetds • Checkout the macports repo git clone --single-branch • Checkout an older version, where the port is with an older version of freetds. In particular: git checkout fb32c4486dab8bc03409927f0d73a8ac3e37cada • Lastly, I ran sudo port install from ~/macports-ports/databases/freetds EDIT It turns out the the file ~/macports-ports/databases/freetds/Portfile has to be placed in a directory accessible by macports. For example /tmp/. After upgrading to macOS High Sierra, I tried to redo the steps in my but it didn't work. The sudo port install returned: Error: Unable to execute port: Could not open file: ~/macports-ports/databases/freetds/Portfile Any ideas? EDIT: pip install git+from a comment above, worked for me. EDIT 2: Using the current HEAD () I manage to install pymssql on my machine and use it (i.e. Connect to an SQL Server). I also try to use it from within a Docker container. The building of the image (including the installation of pymssql is smooth. However, I am unable to connect to the server from the container. This is very strange as only the installation of pymssql is changed. I will try to summarize the situation I am facing. I consider two platforms: • macOS where freetds version 1.00.67 is installed using macports. • Docker container where freetds is installed using RUN apt-get update && apt-get install -y freetds-dev python-dev build-essential && apt-get clean -y I don't know how to check what version is it. The image's base is python:3 On the other hand I consider two versions of pymssql • dev as available in. • 2.1.3 as pointed by The problem I witness is twofold: • Inside a container I can install both version, but I can connect to the server only with the installation of 2.1.3. ![]() When trying to connect using the dev installation I get the following error: Traceback (most recent call last): File 'src/pymssql.pyx', line 636, in pymssql.connect File 'src/_mssql.pyx', line 1952, in _mssql.connect File 'src/_mssql.pyx', line 673, in _mssql.MSSQLConnection.__init__ File 'src/_mssql.pyx', line 1680, in _mssql.maybe_raise_MSSQLDatabaseException _mssql.MSSQLDatabaseException: (20002, b'DB-Lib error message 20002, severity 9: nAdaptive Server connection failed n') • Installing on macOS: I cannot install 2.1.3. When trying pip install pymssql I get: Collecting pymssql Using cached pymssql-2.1.3.tar.gz Building wheels for collected packages: pymssql Running setup.py bdist_wheel for pymssql. I hit both issues that I posted on by following various suggested fixes like installing [email protected]. The only one that fixed my pymssql yesterday was installing from git. I have hit this issue repeatedly over the last two years and installing pymssql is always a pain on a new system. I'd be happy to help debug it but looks like you have it figured out with the latest git version.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |