1
votes

On RHEL trying to install pyodbc getting below error:

InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-q948yR/pyodbc/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-Fdkc1f-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-q948yR/pyodbc

1

1 Answers

3
votes

You need to install a pre-requisite package to built pyodbc. On RHEL:

sudo yum install unixODBC-devel

If you're connecting to SQL Server, don't forget FreeTDS:

sudo yum install freetds-devel

Good luck!