Public bug reported: distutils on focal 20.04 is only avaidable for python3.8 and missing for 3.6 and 3.7. That makes it impossible to use virtualenv for them:
``` ❯ virtualenv -p /usr/bin/python3.6 env36 RuntimeError: failed to query /usr/bin/python3.6 with code 1 err: 'Traceback (most recent call last):\n File "/usr/lib/python3/dist-packages/virtualenv/discovery/py_info.py", line 16, in <module>\n from distutils.command.install import SCHEME_KEYS\nModuleNotFoundError: No module named \'distutils.command\'\n' ``` Copying the missing file to distutils folder makes them work again: ``` sudo cp /usr/lib/python3.8/_sysconfigdata__* /usr/lib/python3.6/ cd /usr/lib/python3.6 sudo ln -s _sysconfigdata_m_linux_x86_64-linux-gnu.py _sysconfigdata_m_x86_64-linux-gnu.py ``` Now it works: ``` ❯ virtualenv -p /usr/bin/python3.6 env36 created virtual environment CPython3.6.9.final.0-64 in 553ms creator CPython3Posix(dest=/opt/develop/work/mhp/audio_recording/env36, clear=False, global=False) seeder FromAppData(download=False, retrying=latest, CacheControl=latest, lockfile=latest, progress=latest, pytoml=latest, ipaddr=latest, urllib3=latest, chardet=latest, html5lib=latest, requests=latest, packaging=latest, pyparsing=latest, pep517=latest, distro=latest, contextlib2=latest, colorama=latest, setuptools=latest, idna=latest, webencodings=latest, six=latest, appdirs=latest, wheel=latest, distlib=latest, pkg_resources=latest, pip=latest, certifi=latest, msgpack=latest, via=copy, app_data_dir=/home/delicj/.local/share/virtualenv/seed-app-data/v1.0.1.debian) activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator ``` More info here: https://stackoverflow.com/questions/23626034 /importerror-no-module-named-distutils/63483399#63483399 ** Affects: python-distutils-extra (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1892159 Title: Python disutils missing for py36 and py37 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-distutils-extra/+bug/1892159/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
