** Description changed: + [Impact] + + * Since Xenial has released, setuptools and pip have dropped support for + Python 3.5 (and 2.7), upstream. + * Virtualenv installs the latest upstream pip and setuptools during + virtualenv creation, from the Internet. + * Python packages gained a mechanism to declare python version support, + but this support arrived since Xenial, so virtualenv can't know which + versions of pip and setuptools are safe to install. + + [Test Case] + + # apt install python python3 virtualenv + $ virtualenv -p python3 ve3 + $ ve3/bin/python -m pip install 'world < 4' + + This should execute without error. + + $ virtualenv -p python2 ve2 + $ ve2/bin/python -m pip install 'world < 4' + + And this should execute without error. + + [Where problems could occur] + + * Anyone who has discovered this broken behaviour could be suprised by + the change. But they'd probably worked-around it by using venv or --no- + download. + + [Original Bug Report] + As of commit[0] setuptools appear to be incompatible with Python3.5 as shipped by xenial. This makes a virtualenv for Python3 fail with a syntax error: - # virtualenv -ppython3 venv - Already using interpreter /usr/bin/python3 - Using base prefix '/usr' - New python executable in /root/venv/bin/python3 - Also creating executable in /root/venv/bin/python - Installing setuptools, pkg_resources, pip, wheel...done. + # virtualenv -ppython3 venv + Already using interpreter /usr/bin/python3 + Using base prefix '/usr' + New python executable in /root/venv/bin/python3 + Also creating executable in /root/venv/bin/python + Installing setuptools, pkg_resources, pip, wheel...done. - # venv/bin/pip install pyyaml + # venv/bin/pip install pyyaml DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove supp - ort for this functionality. - Collecting pyyaml - Using cached PyYAML-5.3.1.tar.gz (269 kB) - Building wheels for collected packages: pyyaml - Building wheel for pyyaml (setup.py) ... error - ... - - File "/usr/lib/python3.5/distutils/command/install.py", line 595, in run - self.run_command(cmd_name) - File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command - self.distribution.run_command(command) - File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command - cmd_obj.run() - File "/root/venv/lib/python3.5/site-packages/setuptools/command/install_scripts.py", line 17, in run - import setuptools.command.easy_install as ei - File "/root/venv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 719 - ): - ^ - SyntaxError: invalid syntax - ---------------------------------------- - ERROR: Failed building wheel for pyyaml + ort for this functionality. + Collecting pyyaml + Using cached PyYAML-5.3.1.tar.gz (269 kB) + Building wheels for collected packages: pyyaml + Building wheel for pyyaml (setup.py) ... error + ... + File "/usr/lib/python3.5/distutils/command/install.py", line 595, in run + self.run_command(cmd_name) + File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command + self.distribution.run_command(command) + File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command + cmd_obj.run() + File "/root/venv/lib/python3.5/site-packages/setuptools/command/install_scripts.py", line 17, in run + import setuptools.command.easy_install as ei + File "/root/venv/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 719 + ): + ^ + SyntaxError: invalid syntax + ---------------------------------------- + ERROR: Failed building wheel for pyyaml # lsb_release -r Release: 16.04 # venv/bin/python3 --version Python 3.5.2 As Python3.5 is EOL we might need to pin setuptools for virtualenv to a lower version - - [0] https://github.com/pypa/setuptools/commit/fc891f5cf6d93ad533e2afb5e15a2952408ab358 + [0] + https://github.com/pypa/setuptools/commit/fc891f5cf6d93ad533e2afb5e15a2952408ab358
** Patch added: "python-virtualenv_15.0.1+ds-3ubuntu1.1.debdiff" https://bugs.launchpad.net/ubuntu/+source/python-virtualenv/+bug/1912248/+attachment/5457506/+files/python-virtualenv_15.0.1+ds-3ubuntu1.1.debdiff ** Changed in: python-virtualenv (Ubuntu Xenial) Status: Confirmed => In Progress ** Changed in: python-virtualenv (Ubuntu Xenial) Assignee: (unassigned) => Stefano Rivera (stefanor) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1912248 Title: virtualenv on xenial: easy_install syntax error To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-virtualenv/+bug/1912248/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs