asdf-community / asdf-python

Python plugin for the asdf version manager
https://github.com/asdf-vm/asdf
MIT License
670 stars 58 forks source link

Python development headers #117

Open johnbendi opened 3 years ago

johnbendi commented 3 years ago

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

tstapler commented 2 years ago

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
rbren commented 2 years ago

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

guseggert commented 1 year ago

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.