matzr matzr - 1 year ago 232
Python Question

Cannot install PIP on Raspbian

I can't get PIP running in my Raspberry (running in Wheezy).
After I always got this message:

~ $ pip3
UserWarning: Support for Python 3.0-3.2 has been dropped. Future
versions will fail here. warnings.warn(msg) Traceback (most recent
call last): File "/usr/local/bin/pip3", line 9, in <module>
load_entry_point('pip==8.1.2', 'console_scripts', 'pip3')() File "/usr/lib/python3/dist-packages/", line 337, in
return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/", line 2280, in
return ep.load() File "/usr/lib/python3/dist-packages/", line 1990, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__']) File
line 16, in <module>
from pip.vcs import git, mercurial, subversion, bazaar # noqa File
line 9, in <module>
from import path_to_url File "/usr/local/lib/python3.2/dist-packages/pip-8.1.2-py3.2.egg/pip/",
line 36, in <module>
from pip.utils.ui import DownloadProgressBar, DownloadProgressSpinner File
line 15, in <module>
from import Bar, IncrementalBar File "/usr/local/lib/python3.2/dist-packages/pip-8.1.2-py3.2.egg/pip/_vendor/progress/",
line 48
empty_fill = u'∙'
^ SyntaxError: invalid syntax

I compiled Python3.5 and now try running the script. But this gives me this error:

Traceback (most recent call last): File "", line 19177, in
main() File "", line 194, in main
bootstrap(tmpdir=tmpdir) File "", line 82, in bootstrap
import pip File "/tmp/tmprewy_1xt/", line 16, in <module> File
"/tmp/tmprewy_1xt/", line 9, in <module>
File "/tmp/tmprewy_1xt/", line 30, in <module>
File "/tmp/tmprewy_1xt/", line 39, in <module>
File "/tmp/tmprewy_1xt/", line
14, in <module> File
"/tmp/tmprewy_1xt/", line 66, in
<module> ImportError: cannot import name 'HTTPSHandler'

OpenSSL is installed.

Any ideas what I'm missing?

Thanks for your help.

Answer Source

OK, sorted. Apparently my Python 2.7 install was somewhat corrupted. After I did sudo apt-get -u dist-upgrade which - with some hick-ups - fixed the install. After that I re-built the 3.5.1 binaries and pip3 works now fine.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download