That looks like a pretty odd thing to be doing. As far as I know, six
is a standalone Python module for scripts that are aiming to be compatible with both 2.x and 3.x, so I can't imagine why urllib3
is bundling its own copy of it instead of just listing it as a dependency. Come to that, why on earth is requests
bundling urllib3
instead of listing that as a dependency? Have these people not heard of pip and virtualenv?
Anyway, poor packaging decisions aside, this looks like it might be Ubuntu messing around with packages. Perhaps they noticed the same thing I just highlighted, because it appears that the copy of requests
in /usr/lib/python2.7/dist-packages/requests
lacks a packages
subdirectory, whereas the versions in /usr/local/lib/python2.6
and /usr/local/lib/python3.3
have it. I'm taking a guess that the one in /usr/lib
is from an Ubuntu package whereas the other two are direct from PyPi.
That's just supposition on my part - I don't have access to the package management tools on PA (quite rightly!) so I can't confirm for sure. If you need a workaround for now, you could create a virtualenv on PA and install requests
in it with pip
, which should ensure you're using the version from PyPi. As long as you do not specify --system-site-packages
when you build the virtualenv, you should be assured of using the version you install. The only problem is if you need to use any of the system packages which have binary components, which you'll be unable to install.
If you don't mind modifying the code you could instead try amending that line to simply:
... and see if that works.