python - 在 OS X 上安装 pip

标签 python macos amazon-web-services pip

<分区>

我想在 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 和 pip。但也可以随意使用 macports。

brew install python

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

关于python - 在 OS X 上安装 pip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36372140/

相关文章:

macos - Cocoa:未调用自定义 View 代理中的 initWithFrame

javascript - AWS 预签名 URL

node.js - 我应该使用哪个亚马逊服务来实现基于时间的队列调度程序(无服务器应用程序)?

node.js - 如何在 AWS 实例上保持持久的 http 服务器打开

python - 访问名称来自用户输入的局部变量

python - 迭代期间在同一行打印字典的值和下一个值

objective-c - NSCursor 设置不适用于未聚焦的窗口

mysql - 系统表安装失败! Mac OS 上的 boot2docker tutum/mysql 挂载文件卷

python - 将十六进制字符(连字)转换为utf-8字符

python - 托管 Tornado /websocket 应用程序