Public bug reported:

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

** Affects: python-virtualenv (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/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

Reply via email to