I’ve recently had to debug a cython library for a specific version of python on ubuntu and I needed python, venv, distutils, cython, pip, a compiler, and a text editor. I had to go fishing around the web for instructions on how to do this, so I’m asking this question to answer with what I did.
I googled it and found instructions in one place for pip, another place for venv, another place for compilers.
2
Answers
I figured this out on ubuntu 20 in docker (I was running as root). If you are not running as root - this answer won't help you.
You have to install the version of python that you want, i recommend use dead-sneak, https://www.codegrepper.com/code-examples/whatever/install+python+3.7+from+source+in+ubuntu+linux.
Later set your python version in the venv, something like "virtualenv venv –python=python{python version}" or "python{python version} -m venv venv"