zillow / ctds

Python DB-API 2.0 library for MS SQL Server
MIT License
83 stars 12 forks source link

can not install via pip(centos 6.8) #56

Closed zhaoziming closed 4 years ago

zhaoziming commented 5 years ago

[root@abc ~]# pip3 install ctds Collecting ctds Using cached https://files.pythonhosted.org/packages/b0/70/b4523f00669dea0af5fc1b0224ce74f7e51b03e05751a9eee6f085963528/ctds-1.10.1.tar.gz Installing collected packages: ctds Running setup.py install for ctds ... error ERROR: Complete output from command /usr/local/python3/bin/python3.6 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-nbgbb_52/ctds/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-g9llu3j2/install-record.txt --single-version-externally-managed --compile: ERROR: running install running build running build_py creating build creating build/lib.linux-x86_64-3.6 creating build/lib.linux-x86_64-3.6/ctds copying src/ctds/init.py -> build/lib.linux-x86_64-3.6/ctds creating build/lib.linux-x86_64-3.6/ctds/pool copying src/ctds/pool/init.py -> build/lib.linux-x86_64-3.6/ctds/pool running build_ext building '_tds' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/src creating build/temp.linux-x86_64-3.6/src/ctds gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DCTDS_MAJOR_VERSION=1 -DCTDS_MINOR_VERSION=10 -DCTDS_PATCH_VERSION=1 -DPY_SSIZE_T_CLEAN=1 -DMSDBLIB=1 -I/usr/local/python3/include/python3.6m -c src/ctds/pyutils.c -o build/temp.linux-x86_64-3.6/src/ctds/pyutils.o gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DCTDS_MAJOR_VERSION=1 -DCTDS_MINOR_VERSION=10 -DCTDS_PATCH_VERSION=1 -DPY_SSIZE_T_CLEAN=1 -DMSDBLIB=1 -I/usr/local/python3/include/python3.6m -c src/ctds/connection.c -o build/temp.linux-x86_64-3.6/src/ctds/connection.o src/ctds/connection.c: In function ‘Connection_free’: src/ctds/connection.c:395:43: error: ‘DBSETDBNAME’ undeclared (first use in this function) dbsetlname(connection->login, "", DBSETDBNAME); ^ src/ctds/connection.c:395:43: note: each undeclared identifier is reported only once for each function it appears in src/ctds/connection.c: In function ‘Connection_create’: src/ctds/connection.c:2129:69: error: ‘DBSETDBNAME’ undeclared (first use in this function) if (FAIL != dbsetlname(connection->login, database, DBSETDBNAME)) ^ error: command 'gcc' failed with exit status 1

ERROR: Command "/usr/local/python3/bin/python3.6 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-nbgbb_52/ctds/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-g9llu3j2/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-nbgbb_52/ctds/

joshuahlang commented 5 years ago

What version of FreeTDS is installed?

zhaoziming commented 5 years ago

What version of FreeTDS is installed?

version is freetds.x86_64 0.82-4.el6

joshuahlang commented 5 years ago

That version is very old and not supported. I'd recommend upgrading to a more recent version

zhaoziming commented 4 years ago

My freetds is very old