My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 358: not installing - missimg 'sql.h'
5 people starred this issue and may be notified of changes. Back to list
Status:  NoFix
Owner:  ----
Closed:  Feb 2014


 
Reported by alhoa.ch...@gmail.com, Jan 29, 2014
$ sudo pip install pyodbc

// ----- LOG -----------------------------------------------------------------------
sudo pip install pyodbc
Downloading/unpacking pyodbc
  Running setup.py egg_info for package pyodbc
    
    warning: no files found matching 'tests/*'
Installing collected packages: pyodbc
  Running setup.py install for pyodbc
    building 'pyodbc' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=3.0.7 -I/usr/include/python2.7 -c /home/chuiii/build/pyodbc/src/errors.cpp -o build/temp.linux-i686-2.7/home/chuiii/build/pyodbc/src/errors.o -Wno-write-strings
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
    In file included from /home/chuiii/build/pyodbc/src/errors.cpp:2:0:
    /home/chuiii/build/pyodbc/src/pyodbc.h:52:17: fatal error: sql.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/chuiii/build/pyodbc/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-6zB5KR-record/install-record.txt:
    running install

running build

running build_ext

building 'pyodbc' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=3.0.7 -I/usr/include/python2.7 -c /home/chuiii/build/pyodbc/src/errors.cpp -o build/temp.linux-i686-2.7/home/chuiii/build/pyodbc/src/errors.o -Wno-write-strings

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]

In file included from /home/chuiii/build/pyodbc/src/errors.cpp:2:0:

/home/chuiii/build/pyodbc/src/pyodbc.h:52:17: fatal error: sql.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/chuiii/build/pyodbc/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-6zB5KR-record/install-record.txt failed with error code 1
Storing complete log in /home/chuiii/.pip/pip.log
// ---------------------------------------------------------------------------------

Version of pyodbc == 3.0.7



Feb 2, 2014
Project Member #2 mich...@kleehammer.com
You need to install the unixODBC (or iODBC if you are using it) header files.

For RedHat based systems, you would install the unixODBC-devel RPM package.  I'm not sure what you are using, but you can might find more information in the Wiki pages and the forum.

Good luck.

Status: NoFix
Aug 13, 2014
#3 dkdndes
You need to install the developement version for the header files. On uBuntu use:

sudo apt-get install unixODBC-dev



Powered by Google Project Hosting