Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip for python3.5 broken Ubuntu 16.10

I'm experiencing a strange issue with the pip(3).

I'm receiving this error when I performed any pip command like pip --version(or pip3 --version):

Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 7, in <module>
    from pip import main
  File "/usr/local/lib/python3.5/dist-packages/pip/__init__.py", line 28, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/local/lib/python3.5/dist-packages/pip/vcs/subversion.py", line 9, in <module>
    from pip.index import Link
  File "/usr/local/lib/python3.5/dist-packages/pip/index.py", line 31, in <module>
    from pip.wheel import Wheel, wheel_ext
  File "/usr/local/lib/python3.5/dist-packages/pip/wheel.py", line 6, in <module>
    import compileall
  File "/usr/lib/python3.5/compileall.py", line 20, in <module>
    from concurrent.futures import ProcessPoolExecutor
  File "/usr/local/lib/python3.5/dist-packages/concurrent/futures/__init__.py", line 8, in <module>
    from concurrent.futures._base import (FIRST_COMPLETED,
  File "/usr/local/lib/python3.5/dist-packages/concurrent/futures/_base.py", line 357
    raise type(self._exception), self._exception, self._traceback
                               ^
SyntaxError: invalid syntax

Python version

Python 3.5.2+ (default, Sep 22 2016, 12:18:14) 
[GCC 6.2.0 20160927] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

~/ pip

pip          pip2         pip2.7       pip3         pip-compile  pip-sync   

I've pip2.7 installed and is working well. I'm under Ubuntu 16.10 and I don't understand what is the issue.

Thanks

like image 605
Matt Avatar asked Feb 13 '17 11:02

Matt


1 Answers

The futures library back-ports some Python 3 features so that they can be used in Python 2.

Unless you absolutely must have it installed, you can just:

pip uninstall futures

to remove it from your Python 3 virtual environment.

like image 172
mpenkov Avatar answered Oct 14 '22 12:10

mpenkov