Although python
is correctly set with respect to python version specified for the build, python-config
is not:
$ which python
/home/travis/virtualenv/python3.8.3/bin/python
$ which python-config
/opt/pyenv/shims/python-config
$ python-config --cflags
pyenv: python-config: command not found
The `python-config' command exists in these Python versions:
3.7
3.7.7
3.8
3.8.3
python-config
is required to build some python modules, bindings and python embedding software, so it’s crucial to have it in sync with current python version. I suspect it can be fixed by adding it to the virtualenv bin/ or setting an environment variable which would allow shim to dispatch to the correct script. For now, I was able to fix this by adding these lines to before_install
:
- export PYTHONPREFIX="$(dirname $(realpath $(which python)))/.."
- export PATH="${PYTHONPREFIX}/bin:${PATH}"
But it should work out of the box.
Example build affected by this problem: