You are not logged in.
Hello everyone,
I am trying to install the package pymssql which is distributed by Python's pip,
when I run the command and error occurs and the installation doesn't complete
correctly.
The output is the following:
➜ ~ sudo pip install pymssql
[sudo] password for ricardo:
Collecting pymssql
Using cached pymssql-2.1.2.tar.gz
Installing collected packages: pymssql
Running setup.py install for pymssql ... error
Complete output from command /usr/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lf48pqso/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-o6fqyxnd-record/install-record.txt --single-version-externally-managed --compile:
setup.py: platform.system() => 'Linux'
setup.py: platform.architecture() => ('64bit', 'ELF')
setup.py: platform.linux_distribution() => ('arch', '', '')
setup.py: platform.libc_ver() => ('glibc', '2.3.4')
setup.py: Not using bundled FreeTDS
setup.py: include_dirs = ['/usr/local/include']
setup.py: library_dirs = ['/usr/local/lib']
running install
running build
running build_ext
building '_mssql' extension
creating build
creating build/temp.linux-x86_64-3.5
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/usr/local/include -I/usr/include/python3.5m -c _mssql.c -o build/temp.linux-x86_64-3.5/_mssql.o -DMSDBLIB
_mssql.c: En la función ‘__pyx_f_6_mssql__tds_ver_str_to_constant’:
_mssql.c:18924:15: error: ‘DBVERSION_80’ undeclared (first use in this function)
__pyx_r = DBVERSION_80;
^~~~~~~~~~~~
_mssql.c:18924:15: note: Each undeclared identifier is reported only once for each function it appears in.
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-lf48pqso/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-o6fqyxnd-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-lf48pqso/pymssql/
I have tried to find an answer somewhere out there but everyone fixes problems *like* this by installing freetds package which I installed and the error indeed changed from some missing header to this one.
So, anybody here knows how can I install that python library? (some of you may be wondering why would I want to install that one but I was forced *at college* to use m$sql server for a project)
Thanks in advance
Last edited by richin13 (2016-06-22 20:35:23)
Offline
Never run pip as root, it will mess up your system. If you want to install it system wide then use makepkg/pacman, else use pip --user or a virtualenv.
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Hi, I am actually using a virtualenv for my project but since the library is messing with system libraries (freetds) I thought it was necessary to install it system-wide. My bad. However, both virtualenv and system-wide installations failed
Thank you
Last edited by richin13 (2016-06-22 17:15:39)
Offline
set LANG to something english and post again. Looks like bad code from upstream though.
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Oops, sorry about the spanish
(venv) ➜ hospital (development) ✗ pip install pymssql
Collecting pymssql
Using cached pymssql-2.1.2.tar.gz
Building wheels for collected packages: pymssql
Running setup.py bdist_wheel for pymssql ... error
Complete output from command /home/ricardo/Dev/Python/PycharmProjects/hospital/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-natb_v2p/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp1x_t1yo7pip-wheel- --python-tag cp35:
setup.py: platform.system() => 'Linux'
setup.py: platform.architecture() => ('64bit', 'ELF')
setup.py: platform.linux_distribution() => ('arch', '', '')
setup.py: platform.libc_ver() => ('glibc', '2.3.4')
setup.py: Not using bundled FreeTDS
setup.py: include_dirs = ['/usr/local/include']
setup.py: library_dirs = ['/usr/local/lib']
running bdist_wheel
running build
running build_ext
building '_mssql' extension
creating build
creating build/temp.linux-x86_64-3.5
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/usr/local/include -I/usr/include/python3.5m -c _mssql.c -o build/temp.linux-x86_64-3.5/_mssql.o -DMSDBLIB
_mssql.c: In function ‘__pyx_f_6_mssql__tds_ver_str_to_constant’:
_mssql.c:18924:15: error: ‘DBVERSION_80’ undeclared (first use in this function)
__pyx_r = DBVERSION_80;
^~~~~~~~~~~~
_mssql.c:18924:15: note: each undeclared identifier is reported only once for each function it appears in
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pymssql
Running setup.py clean for pymssql
Failed to build pymssql
Installing collected packages: pymssql
Running setup.py install for pymssql ... error
Complete output from command /home/ricardo/Dev/Python/PycharmProjects/hospital/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-natb_v2p/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hr95iwcm-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ricardo/Dev/Python/PycharmProjects/hospital/venv/include/site/python3.5/pymssql:
Unable to find pgen, not compiling formal grammar.
warning: no files found matching '*.pyx' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.h' under directory 'Cython/Debugger/Tests'
warning: no files found matching '*.pxd' under directory 'Cython/Utility'
Installed /tmp/pip-build-natb_v2p/pymssql/.eggs/Cython-0.24-py3.5-linux-x86_64.egg
setup.py: platform.system() => 'Linux'
setup.py: platform.architecture() => ('64bit', 'ELF')
setup.py: platform.linux_distribution() => ('arch', '', '')
setup.py: platform.libc_ver() => ('glibc', '2.3.4')
setup.py: Not using bundled FreeTDS
creating tmp
cc -c /tmp/clock_gettimebw440oxf.c -o tmp/clock_gettimebw440oxf.o
cc tmp/clock_gettimebw440oxf.o -lrt -o a.out
removing '/tmp/pip-build-natb_v2p/pymssql/tmp' (and everything under it)
setup.py: include_dirs = ['/usr/local/include']
setup.py: library_dirs = ['/usr/local/lib']
Searching for setuptools_git
Best match: setuptools-git 1.1
Processing setuptools_git-1.1-py3.5.egg
Using /tmp/pip-build-natb_v2p/pymssql/.eggs/setuptools_git-1.1-py3.5.egg
running install
running build
running build_ext
cythoning _mssql.pyx to _mssql.c
building '_mssql' extension
creating build
creating build/temp.linux-x86_64-3.5
gcc -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fPIC -I/usr/local/include -I/usr/include/python3.5m -c _mssql.c -o build/temp.linux-x86_64-3.5/_mssql.o -DMSDBLIB
_mssql.c: In function ‘__pyx_f_6_mssql__tds_ver_str_to_constant’:
_mssql.c:18783:15: error: ‘DBVERSION_80’ undeclared (first use in this function)
__pyx_r = DBVERSION_80;
^~~~~~~~~~~~
_mssql.c:18783:15: note: each undeclared identifier is reported only once for each function it appears in
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/home/ricardo/Dev/Python/PycharmProjects/hospital/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-natb_v2p/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-hr95iwcm-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/ricardo/Dev/Python/PycharmProjects/hospital/venv/include/site/python3.5/pymssql" failed with error code 1 in /tmp/pip-build-natb_v2p/pymssql/
Offline
I think You were right, it was a upstream issue because they just uploaded the 2.1.3 version and It's fixed now.
However I did follow the steps described in this wiki entry so I don't if that helped too.
Thank you
Offline