Path: csiph.com!news.mixmin.net!aioe.org!bofh.it!news.nic.it!robomod From: Karthik Newsgroups: linux.debian.maint.python Subject: Re: Need a Python 3.8 virtual environment Date: Wed, 03 Mar 2021 20:00:02 +0100 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Wed Mar 3 18:52:27 2021 Old-Return-Path: X-Amavis-Spam-Status: No, score=-7.199 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -5.5 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vttubl4FIm/pzEflSZ/he81rlfJdQzdq8Z7tK7q00WY=; b=saCFG03Tdu5zAYZn0XnptWKA/rs2AI8CVS4hdVP5sCgiqTEzXcXYEiPn2cgRjqVDq9 +Vm7eRFuWPZfVUIs80Yu170TRDAwSDr6iiI3t3H70uo4OrbkBUAndpmhVmq4zqAO5JVD hZoA9d7mzPhiLfUxAbioIQ6sLnNT8mRnAw7PgTgj2VvvlrCXgEJncQA+LDbQc1NI9VWV WOZ1Gj+Dusm9hLts+bYUzPKSjQtSvtbeTVNlz47xKHXqsgXcrFLKoBFXJ/lVw4xuaJvO fgGKsY/x7+35fNR/hVWarUlgHignjahk1VfVaPyfnTDJsI0A6Fsh/ZQBX4c8VZFIfDos R/lQ== X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vttubl4FIm/pzEflSZ/he81rlfJdQzdq8Z7tK7q00WY=; b=laDJ92+3J0TCX8kJlZaZh5DfSG6qH8IkEemO4InlvKYuyiCyaNoA5gfxxRKqPFMBXe QshgDJkB4aSDZii/Xu6N+m887cEUrza9E2gkZATU11d57nWTKpwsqBNiW6GlSCcWOvRZ VN5QtFnQIrzUherDMsElG+r5fRsZ1aFRjKfHhja5jTboYuka86Qv8lHj7DTUWcNw20In 32Heejkl8AoJr0gEGwSNnnnSw2YgkmKKZmPoapWsMd35Yi6RH1y29HbSend+0jSY/Nlk lVMiAN0B/dg3T6acMvbP1hqb8cMOjsraBOCNagiiD0s8ZCWP/h704889Pg2GwTVwvM44 8Hlg== X-Gm-Message-State: AOAM533Kqhx4dvnt7TWI14WzXFpB2gai0iKbAl5bOfXVuMNLixyh5fZ3 d4a6c5Zi7OJj/YS8Wd/z0ybshf/QwSzqUrb1Txzk2lFf4L0= X-Google-SMTP-Source: ABdhPJzYn+3eSfiJBykInQKWDXzYp0CwZDzK2VpU7+7mdf+PqO+rD7/V815ibEWkk83KHLRcaoEUO7az4K7IZKbaVIk= X-Received: by 2002:a50:9d4d:: with SMTP id j13mr687806edk.83.1614797530695; Wed, 03 Mar 2021 10:52:10 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Mailing-List: archive/latest/19043 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/CAOwTTkkTCT5VcrM984A-RrOiurQ1xZbzz2peOeZEezreimW6ag@mail.gmail.com Approved: robomod@news.nic.it Lines: 95 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Thu, 4 Mar 2021 00:21:31 +0530 X-Original-Message-ID: X-Original-References: <23748341.5eAvVsrXc7@riemann> Xref: csiph.com linux.debian.maint.python:13259 On Wed, Mar 3, 2021 at 8:56 AM Steven Robbins wrote: > > Hi, > > 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. Being > a newbie, I searched around and found a writeup covering several different > virtualization tools [1]. Note I am using Debian 'sid'. > > I can use the tool "virtualenv" to create a virtual environment for default > python: > > steve@riemann:/tmp$ virtualenv blah > created virtual environment CPython3.9.1.final.0-64 in 77ms > creator CPython3Posix(dest=/tmp/blah, clear=False, no_vcs_ignore=False, > global=False) > seeder FromAppData(download=False, pip=bundle, setuptools=bundle, > wheel=bundle, via=copy, app_data_dir=/home/steve/.local/share/virtualenv) > added seed packages: pip==20.1.1, pkg_resources==0.0.0, > setuptools==44.0.0, wheel==0.34.2 > activators > BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator > > > But not for python 3.8: > > steve@riemann:/tmp$ virtualenv -p python3.8 blah38 > RuntimeError: failed to find interpreter for Builtin discover of > python_spec='python3.8' > > > I have installed literally all the Debian python packages whose name contains > 'python3.8'. A very short list: > > ii libpython3.8:amd64 3.8.7-1 > amd64 Shared Python runtime library (version 3.8) > ii libpython3.8-dev:amd64 3.8.7-1 > amd64 Header files and a static library for Python (v3.8) > ii libpython3.8-minimal:amd64 3.8.7-1 > amd64 Minimal subset of the Python language (version 3.8) > ii libpython3.8-stdlib:amd64 3.8.7-1 > amd64 Interactive high-level object-oriented language (standard > library, version 3.8) > ii python3.8 3.8.7-1 > amd64 Interactive high-level object-oriented language (version 3.8) > ii python3.8-dev 3.8.7-1 > amd64 Header files and a static library for Python (v3.8) > ii python3.8-minimal > > > > I have also tried the module 'venv': > > steve@riemann:/tmp$ python3.8 -m venv v38 > The virtual environment was not created successfully because ensurepip is not > available. On Debian/Ubuntu systems, you need to install the python3-venv > package using the following command. > > apt-get install python3-venv > > You may need to use sudo with that command. After installing the python3-venv > package, recreate your virtual environment. > > Failing command: ['/tmp/v38/bin/python3.8', '-Im', 'ensurepip', '--upgrade', > '--default-pip'] > > steve@riemann:/tmp$ python3.8 -m venv blah38 > The virtual environment was not created successfully because ensurepip is not > available. On Debian/Ubuntu systems, you need to install the python3-venv > package using the following command. > > apt-get install python3-venv > > You may need to use sudo with that command. After installing the python3-venv > package, recreate your virtual environment. > > Failing command: ['/tmp/blah38/bin/python3.8', '-Im', 'ensurepip', '-- > upgrade', '--default-pip'] > > > Note that I do have 'python3-venv' installed, but it is the 3.9 version: > ii python3-venv 3.9.1-1 > amd64 pyvenv-3 binary for python3 (default python3 version) > > > Is there something I've missed? > > Thank you, > -Steve > > [1] https://linuxconfig.org/how-to-set-up-a-python-virtual-environment-on-debian-10-buster try using pyenv https://mentors.debian.net/package/pyenv/