2016-04-02 30 views
9

Tôi muốn cài đặt pip trên OS X Vì vậy, tôi đã tải xuống và cài đặt Python 3.4, và sau đó, Cài đặt pip bằng cách sử dụng tập lệnh được cung cấp bởi Cơ quan bao bì Python; nhưng khi tôi chạy pip tôi nhận được một lệnh không tìm thấyCài đặt pip trên OS X

MacBook-Pro-de-paquirrin:Home paquirrin$ sudo curl -O https://bootstrap.pypa.io/get-pip.py 
Password: 
Sorry, try again. 
Password: 
    % Total % Received % Xferd Average Speed Time Time  Time Current 
           Dload Upload Total Spent Left Speed 
100 1487k 100 1487k 0  0 783k  0 0:00:01 0:00:01 --:--:-- 783k 
MacBook-Pro-de-paquirrin:Home paquirrin$ sudo python3 get-pip.py 
The directory '/Users/paquirrin/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
The directory '/Users/paquirrin/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. 
Collecting pip 
    Downloading pip-8.1.1-py2.py3-none-any.whl (1.2MB) 
    100% |████████████████████████████████| 1.2MB 718kB/s 
Collecting wheel 
    Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB) 
    100% |████████████████████████████████| 71kB 1.6MB/s 
Installing collected packages: pip, wheel 
    Found existing installation: pip 6.0.8 
    Uninstalling pip-6.0.8: 
     Successfully uninstalled pip-6.0.8 
Successfully installed pip-8.1.1 wheel-0.29.0 
MacBook-Pro-de-paquirrin:Home paquirrin$ sudo pip install awsebcli 
sudo: pip: command not found 
+0

không sudo PIP3 cài đặt công việc awsebcli'? – snakecharmerb

+2

Câu hỏi trùng lặp về http://stackoverflow.com/questions/17271319/installing-pip-on-mac-os-x – iSkore

+1

Giải pháp không sử dụng bia: sudo easy_install pip – vishal

Trả lời

3

Dunno, nhưng this crossbar installation tutorial dường như để bù đắp chủ đề của bạn hoàn toàn.

Cộng: Bạn cài đặt pip cục bộ. Hãy thử bin/pip từ trong thư mục bạn đã thực hiện lệnh curl.

+0

Cảm ơn bạn. Nó làm việc cho tôi :) – Woppi

15

Cách dễ nhất tôi thấy là sử dụng nhà pha, nó cài đặt tất cả các python cơ bản và pip quá. Nhưng cảm thấy tự do để sử dụng macports quá.

brew install python 

tôi đã sử dụng những câu trả lời từ đăng bài, nếu bạn cần thêm sự giúp đỡ: How do I install pip on macOS or OS X?

Các vấn đề liên quan