Le 2021-03-03 à 04:17, Steven Robbins a écrit :
> I'm trying to use a (non-Debian) python system built on python 3.8.  Debian's
> default is currently 3.9 so I am advised to use a virtual environment.

As other  told, the right way is probably to compile it yourself (or use
pyenv, but I don't like pyenv "shims", I prefer to keep it simple).

I'm using a bash function [1] to easily recompile needed Pythons (I test
some projects with Python 3.5 to 3.9), but it's not that hard without my
bash function:

     apt install make build-essential libbz2-dev liblzma-dev libssl-dev
llvm libreadline-dev libncurses5-dev libffi-dev zlib1g-dev tk-dev
libsqlite3-dev xz-utils
     wget the version you want from https://www.python.org/ftp/python
     tar -xzf it
     ./configure --prefix=$HOME/.local/
     make -j $(nproc)
     make altinstall

You'll get a `python3.8` binary in ~/.local/bin, you can create venvs
with it as:

     python3.8 -m venv the_venv_path

[Julien Palard](https://mdk.fr)

Reply via email to