Closed manalkhalifa closed 1 year ago
src/pyodbc.h:45:20: fatal error: Python.h: No such file or directory
do you have python-dev or similar package installed?
Yes. I already installed python3-devel but still doesnt work
I see that python3-devel support all python3. X Version. But hoe we can find where python3-devel include in the python36 virtual env to do the same with python38
Had the same issue, but with Python 3.9 and running on Ubuntu 20.04. Maybe installing unixodbc-dev:
sudo apt install unixodbc-dev
helps for you as well. See here: https://stackoverflow.com/questions/71383153/pyodbc-legacy-install-failure-in-ubuntu-python-3-9/72935800#72935800
I don't know why the include directory from python-devel is not being used yet, but you may not need it. Version 4.0.34 was released yesterday with prebuild binary wheels for Linux. If you install again today, it might work just fine.
Thanks to an amazing job by @keitherskine, new releases build official wheels now. There is an official 4.0.35 wheel available.
I have used python:3.11-alpine
RUN apk update && apk add postgresql-dev gcc g++ unixodbc-dev python3-dev curl bash sudo
The above Dockerfile works for me.
I'm using python3.8 same issue is resolved on my side by below command: sudo apt install python3.8-dev
Please first make sure you have looked at:
Environment
To diagnose, we usually need to know the following, including version numbers. On Windows, be sure to specify 32-bit Python or 64-bit:
i try to install pyodbc via pip pip install pyodbc and i got this error