← Back to team overview

group.of.nepali.translators team mailing list archive

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

 

The issue is that virtualenv bundles pip 8.1.1, which doesn't know about
python_version. It then tries to upgrade to the latest pip and
setuptools, but that version isn't Python 3.5 compatible.

If you build the virtualenv with --no-download, or use venv instead of
virtualenv, you'll get just pip 8.1.1, and setuptools 20.7.0. You can
then explicitly upgrade them to setuptools < 51.3, as you describe.

We could add a hack to virtualenv to specify the setuptools < 51.3 restriction.
But given Ubuntu 18.04 is almost EOL, I'm tempted to just leave this one be. It has a workaround...

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

** Also affects: python-virtualenv (Ubuntu Xenial)
   Importance: Undecided
       Status: New

-- 
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:
  New

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