Closed fervand1 closed 1 year ago
The pyodbc v4.0.39 code itself does support Python_2, but the workflow they use to build the wheels has already dropped py2 support. You can build from source as above once you have the prerequisites. You get those using a command similar to
sudo apt install unixodbc-dev python2-dev
Thanks that resolves it
Environment
Issue
Python 2.7 wheel files missing in the release even though the version is mentioned in supported version list
Error
Building wheels for collected packages: pyodbc Building wheel for pyodbc (PEP 517): started Building wheel for pyodbc (PEP 517): finished with status 'error' ERROR: Command errored out with exit status 1: command: /usr/local/bin/python /usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpMsHYmK cwd: /tmp/pip-install-4uOaE4/pyodbc Complete output (19 lines): WARNING: '' not a valid package name; please use only .-separated package names in setup.py running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-2.7 copying src/pyodbc.pyi -> build/lib.linux-x86_64-2.7 running build_ext building 'pyodbc' extension creating build/temp.linux-x86_64-2.7 creating build/temp.linux-x86_64-2.7/src gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPYODBC_VERSION=4.0.39 -I/usr/local/include/python2.7 -c src/buffer.cpp -o build/temp.linux-x86_64-2.7/src/buffer.o -Wno-write-strings cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ In file included from src/buffer.cpp:12: src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory
include
compilation terminated. error: command 'gcc' failed with exit status 1
ERROR: Failed building wheel for pyodbc Failed to build pyodbc ERROR: Could not build wheels for pyodbc which use PEP 517 and cannot be installed directly