Skip to content

Mention python3-venv for Debian/Ubuntu setups #399

Closed

Description

@ncoghlan

Debian & Ubuntu are missing the ensurepip module by default for Python 3.5+: you need to install python3-venv in order to get it.

https://packaging.python.org/guides/installing-using-linux-tools/ should be updated to mention that.

Activity

  1. self-assigned this
    on Feb 9, 2018
  2. theacodes commented on Feb 9, 2018

    @theacodes
    Contributor

    @ncoghlan not sure what you mean here, none of the other linux sections suggest installing virtualenv, should I update all of them to install pip, setuptools, wheel, and virtualenv?

  3. ncoghlan commented on Feb 11, 2018

    @ncoghlan
    ContributorAuthor

    The problem is that Debian & Ubuntu remove ensurepip and venv from their Python 3 installation, so by default "python3 -m venv" doesn't work, and neither does "python3 -m pip".

    Other redistributors (including other Linux distros) don't do that - they make venv and pip available by default, as the standard library reference indicates they should.

    (Note: my initial description here wasn't quite accurate - it's both venv and ensurepip that are missing from the default install on Debian, not just ensurepip, hence the name of the addon package)

  4. theacodes commented on Feb 23, 2018

    @theacodes
    Contributor

    While confirming this I noticed some unfortuante behavior: python3 -m venv runs without python3-venv but errors, I'm sure users love that:

    root@ffea451b5ef4:/# python3 -m venv /env
    Error: Command '['/env/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions