【问题标题】:Install pip on OS X [closed]在 OS X 上安装 pip [关闭]
【发布时间】:2016-04-02 10:33:41
【问题描述】:

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

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

【问题讨论】:

标签: python macos amazon-web-services pip


【解决方案1】:

我发现最简单的方法是使用自制软件,它也安装了所有基本的 python 和 pip。但也可以随意使用 macports。

brew install python

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

【讨论】:

  • 最佳答案,尝试制作别名后,brew install python,sudo python get-pip.py 是 sudo easy_install pip
【解决方案2】:

不知道,但this crossbar installation tutorial 似乎完全涵盖了您的主题。

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

【讨论】:

  • 谢谢。它对我有用:)
猜你喜欢
  • 2013-06-03
  • 1970-01-01
  • 2012-01-08
  • 2013-09-29
  • 2013-06-20
  • 2015-12-06
  • 2015-12-24
  • 1970-01-01
  • 2017-04-05
相关资源
最近更新 更多