danishabdullah / pyodbc

Automatically exported from code.google.com/p/pyodbc
Other
0 stars 0 forks source link

not installing - missimg 'sql.h' #358

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
$ 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(__fil
e__).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

Original issue reported on code.google.com by alhoa.ch...@gmail.com on 29 Jan 2014 at 11:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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.

Original comment by mich...@kleehammer.com on 3 Feb 2014 at 12:52

GoogleCodeExporter commented 8 years ago
You need to install the developement version for the header files. On uBuntu 
use:

sudo apt-get install unixODBC-dev

Original comment by dkdndes on 13 Aug 2014 at 10:58