Path: csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod From: Julien Palard Newsgroups: linux.debian.maint.python Subject: Re: Need a Python 3.8 virtual environment Date: Wed, 03 Mar 2021 11:50:01 +0100 Message-ID: References: X-Original-To: Steven Robbins , debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Mar 3 10:46:12 2021 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.778 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FOURLA=0.1, FVGT_m_MULTI_ODD=0.02, LDO_WHITELIST=-5, MD5_SHA1_SUM=-1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001] autolearn=ham autolearn_force=no X-Policyd-Weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .palard. - helo: .mail-40136.protonmail. - helo-domain: .protonmail.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -5.5 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=palard.fr; s=protonmail; t=1614768355; bh=oDTpMn7aDFXRf5iT39EkbfTZmR/euoyl1MRqTgRfKiA=; h=Date:To:From:Reply-To:Subject:In-Reply-To:References:From; b=VvpJ+TAznaoU5tf7QL0uafhFwmx9RR4S77a+lL6Bs+PyE4j2IcVVK2GaSl6IxmaTG UAw5bfnC1930rC45USyB1Er4ePGveiVMHeGyG0bU85vCy4cdH2DKEWKSb2E35TiyFu PTTXJpk3fQdEhq9vlKsVHVA/PIbLWstdKRZvK6GY= Reply-To: Julien Palard MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailing-List: archive/latest/19035 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/f3e9ae02-253c-3688-dab2-d28461c6922a@palard.fr Approved: robomod@news.nic.it Lines: 31 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 03 Mar 2021 10:45:46 +0000 X-Original-Message-ID: X-Original-References: <23748341.5eAvVsrXc7@riemann> Xref: csiph.com linux.debian.maint.python:13251 Le 2021-03-03 =C3=A0 04:17, Steven Robbins a =C3=A9crit=C2=A0: > I'm trying to use a (non-Debian) python system built on python 3.8. Debi= an'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=3D$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 [1]: https://github.com/JulienPalard/dotfiles/blob/0b5feb79b1ba648b7212162b68da5= a182e0341c1/.bashrc#L196 -- [Julien Palard](https://mdk.fr)