Comment 10 for bug 1880749

Revision history for this message
Stefano Rivera (stefanor) wrote : Re: python3 virtualenvs include (broken) bundled pip deps

> You will notice there are a plethora of extra packages in the virtual environment that should not normally be there, resulting in a dirty virtual environment.

Looking at if this can be changed for Ubuntu 20.04. I'm afraid it may be complex. I think we may need to patch pip to be able to apply these changes to virtualenv.

> To make matters worse, the latest release of pip bundles incompatible versions of libraries. The net result is that `pip install pep517` will show that it is already installed, and but `import pep517` will result in an ImportError.

I can't reproduce that:

1. pep517 imports successfully.
2. pip can upgrade it, without error.

root@actual-krill:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
root@actual-krill:~# python3 -m virtualenv foo && source foo/bin/activate
created virtual environment CPython3.8.5.final.0-64 in 590ms
  creator CPython3Posix(dest=/root/foo, clear=False, global=False)
  seeder FromAppData(download=False, CacheControl=latest, appdirs=latest, certifi=latest, chardet=latest, colorama=latest, contextlib2=latest, distlib=latest, distro=latest, html5lib=latest, idna=latest, ipaddr=latest, lockfile=latest, msgpack=latest, packaging=latest, pep517=latest, pip=latest, pkg_resources=latest, progress=latest, pyparsing=latest, pytoml=latest, requests=latest, retrying=latest, setuptools=latest, six=latest, urllib3=latest, webencodings=latest, wheel=latest, via=copy, app_data_dir=/root/.local/share/virtualenv/seed-app-data/v1.0.1.debian)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
(foo) root@actual-krill:~# pip list
Package Version
------------- ----------
appdirs 1.4.3
CacheControl 0.12.6
certifi 2019.11.28
chardet 3.0.4
colorama 0.4.3
contextlib2 0.6.0
distlib 0.3.0
distro 1.4.0
html5lib 1.0.1
idna 2.8
ipaddr 2.2.0
lockfile 0.12.2
msgpack 0.6.2
packaging 20.3
pep517 0.8.2
pip 20.0.2
pkg-resources 0.0.0
progress 1.5
pyparsing 2.4.6
pytoml 0.1.21
requests 2.22.0
retrying 1.3.3
setuptools 44.0.0
six 1.14.0
urllib3 1.25.8
webencodings 0.5.1
wheel 0.34.2
(foo) root@actual-krill:~# python
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pep517
>>>
(foo) root@actual-krill:~# pip install pep517
Requirement already satisfied: pep517 in ./foo/lib/python3.8/site-packages (0.8.2)
(foo) root@actual-krill:~# pip install -U pep517
Collecting pep517
  Downloading pep517-0.9.1-py2.py3-none-any.whl (18 kB)
Collecting toml
  Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
Installing collected packages: toml, pep517
  Attempting uninstall: pep517
    Found existing installation: pep517 0.8.2
    Uninstalling pep517-0.8.2:
      Successfully uninstalled pep517-0.8.2
Successfully installed pep517-0.9.1 toml-0.10.2
(foo) root@actual-krill:~# lsb_release -a^C
(foo) root@actual-krill:~# python
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pep517
>>>

Am I missing something obvious?