asdf-python icon indicating copy to clipboard operation
asdf-python copied to clipboard

Python development headers

Open johnbendi opened this issue 3 years ago • 3 comments

How can I install the development headers for Python for asdf Python installation?

johnbendi avatar Nov 07 '21 14:11 johnbendi

I was able to build my python version including development headers by using an environment variable.

I found it by reading the python-build documentation from pyenv https://github.com/pyenv/pyenv/tree/master/plugins/python-build#building-with---enable-shared

export PYTHON_CONFIGURE_OPTS="--enable-shared"
asdf install python 3.9.8

tstapler avatar Apr 18 '22 06:04 tstapler

Sadly this didn't work for me. I'm also stuck on this.

rbren avatar Jun 23 '22 20:06 rbren

For me these headers were already installed, just not wired up, so I was running into issues installing some packages with pip due to being unable to find Python.h and related header files (e.g. for netifaces). asdf/pyenv is not wiring up CFLAGS, I'm not sure if this is expected or not, but I unblocked myself with export CFLAGS="$(python-config --cflags)" before the pip install which enabled the builds to succeed.

guseggert avatar Aug 23 '23 16:08 guseggert