Ho un sistema OS X in cui ho bisogno di installare un modulo per Python 2.6. Sia pip
e easy_install-2.6
stanno fallendo:Come installo pip per Python 2.6 su OS X?
# /usr/bin/easy_install-2.6 pip
Searching for pip
Reading http://pypi.python.org/simple/pip/
Download error: unknown url type: https -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error: unknown url type: https -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')
Download get_pip.py ed eseguirlo con il brodo OS X pitone fornito 2.6:
# python2.6 ./get_pip.py
Traceback (most recent call last):
File "./get_pip.py", line 17868, in <module>
main()
File "./get_pip.py", line 162, in main
bootstrap(tmpdir=tmpdir)
File "./get_pip.py", line 82, in bootstrap
import pip
File "/tmp/tmpVJBvaW/pip.zip/pip/__init__.py", line 15, in <module>
File "/tmp/tmpVJBvaW/pip.zip/pip/vcs/subversion.py", line 9, in <module>
File "/tmp/tmpVJBvaW/pip.zip/pip/index.py", line 30, in <module>
File "/tmp/tmpVJBvaW/pip.zip/pip/wheel.py", line 34, in <module>
File "/tmp/tmpVJBvaW/pip.zip/pip/_vendor/__init__.py", line 92, in load_module
ImportError: No module named 'pip._vendor.distlib.scripts'
$ python2.6 --version
Python 2.6.9
Con python2.7, entrambi i metodi funziona bene.
Dovrebbe essere fornito automaticamente quando si installa Python tramite 'brew', ad esempio' brew install python'. In alternativa utilizzare: 'sudo easy_install pip'. – kenorb
Prova l'estensione Homebrew, [BrewPip] (http://brewformulas.org/BrewPip). –
Che ne dici di provare a installare pip dall'origine? https://pypi.python.org/pypi/pip#downloads – dermen