← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1912248] Re: virtualenv on xenial: easy_install syntax error

 

This bug was fixed in the package python-virtualenv - 15.0.1+ds-
3ubuntu1.1

---------------
python-virtualenv (15.0.1+ds-3ubuntu1.1) xenial; urgency=medium

  * Pin pip and setuptools to versions compatible with Python 2.7 and 3.5.
    (LP: #1912248)

 -- Stefano Rivera <stefanor@xxxxxxxxxx>  Wed, 27 Jan 2021 11:29:14
-0700

** Changed in: python-virtualenv (Ubuntu Xenial)
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1912248

Title:
  virtualenv on xenial: easy_install syntax error

Status in python-virtualenv package in Ubuntu:
  Fix Released
Status in python-virtualenv source package in Xenial:
  Fix Released

Bug description:
  [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.

  # 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

  # 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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-virtualenv/+bug/1912248/+subscriptions