在OS X上安装pip

时间:2016-04-02 10:33:41

标签: python macos amazon-web-services pip

我想在OS X上安装pip 所以我下载并安装了Python 3.4,然后使用Python Packaging Authority提供的脚本安装pip;但是当我运行pip时,我找到了命令

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

2 个答案:

答案 0 :(得分:18)

我发现最简单的方法是使用家庭酿造,它安装所有基本的python和pip。但也可以随意使用macport。

var thisTemp;

function callback(params){..
// use variable here
thisTemp.blah();
...
}

class RespProperties extends Component { ..
//Assign this to thisTemp
thisTemp = this;
...
}

如果您需要更多帮助,我会使用帖子中的答案:How do I install pip on macOS or OS X?

答案 1 :(得分:8)

Dunno,但this crossbar installation tutorial似乎完全涵盖了你的主题。

加号:您在本地安装pip。在您执行bin/pip命令的文件夹中尝试curl