[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Python-modules-team] My Pip installation is broken after upgrading Debian from oldstable/Wheezy to stable/Jessie...



On Sat, Jan 02, 2016 at 04:39:24PM +0100, Daniele Tricoli wrote:
> Hello,
> sorry for the delay in my reply!

Hi! No problems due to the holidays. ;)

 
> On Saturday, January 02, 2016 10:32:50 AM Brian May wrote:
> > Are you sure? This bug was supposedly fixed in the Jessie version...
> 
> 03_export-IncompleteRead.patch is still present in the requests packaging 
> (since pip version in Debian still need it) and was shipped with requests 
> 2.4.3-2.
> 
> @Ant Dude: just to recap and to be sure I understand correctly: you should 
> have installed requests 2.4.3-6 and python-pip (1.5.6-5), right?

Yes, but probably from Wheezy when before Jessie became the new stable. 
My dpkg -l shows:
ii  python-requests                       2.4.3-6                              all          elegant and simple HTTP library for Python2, built for human beings
ii  python-pip                            1.5.6-5                              all          alternative Python package installer


> Renaming requests (Debian packaged version) install directory make pip work, 
> right?

Yes.


> Debian packaged version of pip doesn't use convenience copies, so do you have 
> a version of requests installed not using apt?
> Please can you tell me what is the output of the following?
> 
>     python -c "import requests; print requests.__version__"
> 
> Please, can you also try:
> 
>     python -c "from requests.compat import IncompleteRead"

With /usr/local/lib/python2.7/dist-packages/requestsRENAMED
$ python -c "import requests; print requests.__version__"
2.4.3
$ python -c "from requests.compat import IncompleteRead"
$

With the original /usr/local/lib/python2.7/dist-packages/requests:
$ python -c "import requests; print requests.__version__"
2.9.1
$ python -c "from requests.compat import IncompleteRead"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name IncompleteRead

I tried "apt-get purge python-pip python-requests" and then reinstalling 
them to see if the problem would go away. Nope:
$ pip
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    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 
<module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "/usr/lib/python2.7/dist-packages/pip/vcs/mercurial.py", line 9, 
in <module>
    from pip.download import path_to_url
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 25, in 
<module>
    from requests.compat import IncompleteRead
ImportError: cannot import name IncompleteRead


Again, I renamed the old requests directory for me to use pip again. :(


Reply to: