!pip pyodbc fails
Downloading/unpacking pyodbc
Downloading pyodbc-3.0.10.tar.gz (68kB): 68kB downloaded
Running setup.py (path:/home/notebook/kaenv/build/pyodbc/setup.py) egginfo for package pyodbc
warning: no files found matching 'tests/*'
warning: no files found matching 'README.rst'
Installing collected packages: pyodbc
Running setup.py install for pyodbc
building 'pyodbc' extension
x8664-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPYODBCVERSION=3.0.10 -DPYODBCUNICODEWIDTH=4 -DSQLWCHARTCONVERT=1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -I/usr/include/python2.7 -c /home/notebook/kaenv/build/pyodbc/src/params.cpp -o build/temp.linux-x8664-2.7/home/notebook/kaenv/build/pyodbc/src/params.o -Wno-write-strings
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /home/notebook/kaenv/build/pyodbc/src/params.cpp:3:0:
/home/notebook/kaenv/build/pyodbc/src/pyodbc.h:52:17: fatal error: sql.h: No such file or directory
#include <sql.h>
^
compilation terminated.
error: command 'x8664-linux-gnu-gcc' failed with exit status 1
Complete output from command /home/notebook/kaenv/bin/python -c "import setuptools, tokenize;file='/home/notebook/kaenv/build/pyodbc/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-tNzYmu-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/notebook/ka_env/include/site/python2.7:
running install
running build
running build_ext
building 'pyodbc' extension
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/home
creating build/temp.linux-x86_64-2.7/home/notebook
creating build/temp.linux-x8664-2.7/home/notebook/kaenv
creating build/temp.linux-x8664-2.7/home/notebook/kaenv/build
creating build/temp.linux-x8664-2.7/home/notebook/kaenv/build/pyodbc
creating build/temp.linux-x8664-2.7/home/notebook/kaenv/build/pyodbc/src
x8664-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DPYODBCVERSION=3.0.10 -DPYODBCUNICODEWIDTH=4 -DSQLWCHARTCONVERT=1 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include -I/usr/include/python2.7 -c /home/notebook/kaenv/build/pyodbc/src/params.cpp -o build/temp.linux-x8664-2.7/home/notebook/ka_env/build/pyodbc/src/params.o -Wno-write-strings
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /home/notebook/ka_env/build/pyodbc/src/params.cpp:3:0:
/home/notebook/ka_env/build/pyodbc/src/pyodbc.h:52:17: fatal error: sql.h: No such file or directory
#include <sql.h>
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Cleaning up...
Command /home/notebook/kaenv/bin/python -c "import setuptools, tokenize;file='/home/notebook/kaenv/build/pyodbc/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-tNzYmu-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/notebook/kaenv/include/site/python2.7 failed with error code 1 in /home/notebook/kaenv/build/pyodbc
Traceback (most recent call last):
File "/home/notebook/kaenv/bin/pip", line 11, in <module>
sys.exit(main())
File "/home/notebook/kaenv/local/lib/python2.7/site-packages/pip/init.py", line 185, in main
return command.main(cmdargs)
File "/home/notebook/kaenv/local/lib/python2.7/site-packages/pip/basecommand.py", line 161, in main
text = '\n'.join(complete_log)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)
PyODBC is now installed as part of Python notebooks. There is no need to pip install pyodbc anymore