Tôi có hệ điều hành OS X nơi tôi cần cài đặt mô-đun cho python 2.6. Cả hai pip
và easy_install-2.6
đang thất bại:Làm cách nào để cài đặt pip cho Python 2.6 trên 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')
Tải get_pip.py và chạy nó với các cổ phiếu OS X cung cấp python 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
Với python2.7, một trong hai phương pháp hoạt động tốt.
Nó sẽ tự động được cung cấp khi cài đặt Python qua 'brew', ví dụ:' brew install python'. Hoặc sử dụng: 'sudo easy_install pip'. – kenorb
Hãy thử phần mở rộng Homebrew, [BrewPip] (http://brewformulas.org/BrewPip). –
Làm thế nào về cố gắng để cài đặt pip từ nguồn? https://pypi.python.org/pypi/pip#downloads – dermen