Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to install pymssql with no luck:

pip install pymssql
Downloading/unpacking pymssql
  Downloading pymssql-2.0.1.tar.bz2 (1.9MB): 1.9MB downloaded
  Running setup.py (path:/tmp/pip_build_root/pymssql/setup.py) egg_info for package pymssql
    setup.py: platform.system() => 'Linux'
    setup.py: platform.architecture() => ('32bit', 'ELF')
    setup.py: platform.linux_distribution() => ('debian', '7.3', '')
    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']

    warning: no files found matching 'win32/freetds.zip'
Installing collected packages: pymssql
  Running setup.py install for pymssql
    setup.py: platform.system() => 'Linux'
    setup.py: platform.architecture() => ('32bit', 'ELF')
    setup.py: platform.linux_distribution() => ('debian', '7.3', '')
    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']
    building '_mssql' extension
    i486-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include/python2.7 -c _mssql.c -o build/temp.linux-i686-2.7/_mssql.o -DMSDBLIB
    _mssql.c:8:22: fatal error: pyconfig.h: No such file or directory
     #include "pyconfig.h"
                          ^
    compilation terminated.
    error: command 'i486-linux-gnu-gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptoolº tokenize;__file__='/tmp/pip_build_root/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8cJl01-record/install-record.txt --single-version-externally-managed --compile:
    setup.py: platform.system() => 'Linux'

setup.py: platform.architecture() => ('32bit', 'ELF')

setup.py: platform.linux_distribution() => ('debian', '7.3', '')

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-i686-2.7

i486-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/include/python2.7 -c _mssql.c -o build/temp.linux-i686-2.7/_mssql.o -DMSDBLIB

_mssql.c:8:22: fatal error: pyconfig.h: No such file or directory

 #include "pyconfig.h"

                      ^

compilation terminated.

error: command 'i486-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptoolº tokenize;__file__='/tmp/pip_build_root/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8cJl01-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pymssql
Storing debug log for failure in /root/.pip/pip.log

Any ideea why?

share|improve this question

1 Answer 1

It could be that you are missing the python-dev package

share|improve this answer
    
Also, I found that `freetds-dev' is required too –  apple16 Jul 31 '14 at 21:06

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.