On Wed, Dec 30, 2015 at 08:23:56PM +1100, Brian May wrote: > Ant Dude <a...@zimage.com> writes: > > > Dear Sir or Madam: > > > > Hello. > > > > A couple days ago, I upgraded my old Debian from oldstable/Wheezy to > > stable/Jessie but its Pip now crashes as shown below: > > > > $ pip install > > Traceback (most recent call last): > > File "/usr/bin/pip", line 9, in > > load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() > > File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in > > load_entry_point > > return get_distribution(dist).load_entry_point(group, name) > > File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in > > load_entry_point > > return ep.load() > > File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load > > ['name']) > > File "/usr/lib/python2.7/dist-packages/pip/init.py", line 74, in > > from pip.vcs import git, mercurial, subversion, bazaar # noqa > > File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, in > > from pip.download import path_to_url > > File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in > > from requests.compat import IncompleteRead > > ImportError: cannot import name IncompleteRead > > > > $ python > > Python 2.7.9 (default, Mar 1 2015, 12:57:24) > > [GCC 4.9.2] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > exit > > Use exit() or Ctrl-D (i.e. EOF) to exit > > > > How do I fix this? I already tried apt-get purge and reinstalling > > python-pip, python-colorama, python-distlib, python-html5lib, > > python-ndg-httpsclient, python-requests, python-urllib3, and > > python-wheel packages. Pip worked before the upgrade. :( > > Do you have any python packages installed under /usr/local? If so, this > could cause breakages as these files are outside the control of the > package manager.
I have no idea, Brian: $ ls -all /usr/local total 40 drwxr-xr-x 10 root staff 4096 Nov 24 2011 . drwxr-xr-x 12 root root 4096 Jul 5 2013 .. drwxr-xr-x 2 root staff 4096 Dec 29 16:15 bin drwxrwsr-x 2 root staff 4096 Nov 24 2011 etc drwxrwsr-x 2 root staff 4096 Nov 24 2011 games drwxrwsr-x 2 root staff 4096 Nov 24 2011 include drwxrwsr-x 8 root staff 4096 Dec 27 20:19 lib lrwxrwxrwx 1 root staff 9 Nov 24 2011 man -> share/man drwxrwsr-x 2 root staff 4096 Nov 24 2011 sbin drwxrwsr-x 10 root staff 4096 Dec 27 20:19 share drwxrwsr-x 2 root staff 4096 Nov 24 2011 src > In short, it isn't recommended practise to use pip install with Debian, > except for inside a virtualenv (or similar), as the packages can > conflict with Debian packages - especially after a upgrade. Interesting. I did find a fix and it seems like others had the same problem. FFrom Debian's forum, it said https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744145#31 -- rm -rf /usr/local/lib/python2.7/dist-packages/requests* I renamed request directory and now can run Debian's pip command. Sheesh. I also notice it is an old bug that is still not fixed. :( Vest regards, Ant