In order to use a scientific camera, I need to use an old python module that require python 3.9. I use a PC with the last Ubuntu 24.10 (that comes with python3.12) I thought a quick pipenv with python 3.9 would do the trick. It doesn't seem to be straightforward though... Compile python3.9 from the source Since it has become impossible to install old version of python via apt install. Even using the deadsnake ppa (add-apt-repository ppa:deadsnakes/ppa) doesnt work for non LTS Ubuntu... (https://github.com/deadsnakes/issues/issues/249) If one wants to install an old python it has therefor to be from the source... (got the idea from https://askubuntu.com/questions/1539019/how-to-install-python-3-10-on-ubuntu-24-10) 1/ Install dependancies: $ sudo apt install -y build-essential libssl-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libffi-dev zlib1g-dev 2/ Download and extract the last python 3.9 $ sudo wget https://www.python.org/ftp/python/3.9.21/Python-3.9.21.tgz $ sudo tar -xvf Python-3.9.21.tgz 3/ Compile and install: $ cd Python-3.9.21 $ sudo ./configure --enable-optimizations $ sudo make altinstall` It instals in /usr/local/bin : $ ls -la /usr/local/bin total 15684 drwxr-xr-x 2 root root 4096 Mar 13 14:09 . drwxr-xr-x 11 root root 4096 Oct 7 21:03 .. -rwxr-xr-x 1 root root 101 Mar 13 14:09 2to3-3.9 -rwxr-xr-x 1 root root 99 Mar 13 14:09 idle3.9 -rwxr-xr-x 1 root root 229 Mar 13 14:09 pip3.9 -rwxr-xr-x 1 root root 84 Mar 13 14:09 pydoc3.9 -rwxr-xr-x 1 root root 16029664 Mar 13 14:08 python3.9 -rwxr-xr-x 1 root root 3053 Mar 13 14:09 python3.9-config I have now two version of python installed! $ python3 --version Python 3.12.7 $ python3.9 --version Python 3.9.21 I create my pipenv: $ pipenv install --python '/usr/local/bin/python3.9' Creating a Pipfile for this project... Pipfile.lock not found, creating... Locking [packages] dependencies... Locking [dev-packages] dependencies... Updated Pipfile.lock (702ad05de9bc9de99a4807c8dde1686f31e0041d7b5f6f6b74861195a52110f5)! Installing dependencies from Pipfile.lock (2110f5)... To activate this project's virtualenv, run pipenv shell. Alternatively, run a command inside the virtualenv with pipenv run. BUT: $ pipenv run python --version Python 3.12.7 instead of python 3.9.21 :'-( What am I doing wrong?? NB: I also tryed $ pipenv install --python3.9 but got a error message. Not sure why, not sure what it means... the answer actually came in the comments. there was a space issue >< The correct command is: $ pipenv install --python 3.9 then: $ pipenv run python --version Python 3.9.21 $ python3 --version Python 3.12.7 $ python3.9 --version Python 3.9.21 Continue reading...