If you look at any job Python 3.8, c++17, gcc 7 (w/o numpy/scipy) in Travis CI builds, they don't seem to actually be using Python 3.8. (Not sure if this is due to a patch I submitted...)
Came across this is in our fork, which effectively uses the same CI scripts here.
See this build:
https://travis-ci.org/github/pybind/pybind11/jobs/640390164#L467
-- Found PythonInterp: /opt/pyenv/shims/python3 (found version "3.6.7")
Do you think that changing PY_CMD=python3 to PY_CMD=python3.8 would be sufficient to fix that? Or is there more todo?
Yup, I think that would be it!
Testing it out in my fork, can PR the patch if I can confirm it works:
https://github.com/RobotLocomotion/pybind11/pull/40
(I may also disable one of the PyPy jobs, as that seems to be freezing on a download?)
OK. I think if that doesn't work, then maybe some clever use of update-alternatives may help. I'm not really familiar with any of that though. I'm just starting to look into travis-ci myself, here.
Good luck!
Looks like you will need to add this package too:
- python3.8-distutils
Which allows python3.8 -m pip to work on xenial.
My mistake, I had installed python3.8 from snap a while ago and uninstalled it, so my environment is not clean.
This may be the way to install pip in python3.8 (on xenial) using deadsnakes: https://github.com/deadsnakes/issues/issues/95
curl https://bootstrap.pypa.io/get-pip.py | python3.8
But you might want to read that page first in case you think it may be a bad idea.
Hm... Lemme try out python3 -m ensurepip, as that tends to work when build CPython from source. Thanks!
Possibly related: https://github.com/pybind/pybind11/issues/1090
This has all been wiped out and replaced by GHA, and those do run the correct versions. :)
Most helpful comment
This has all been wiped out and replaced by GHA, and those do run the correct versions. :)