python - 无法在 El Capitan (10.11) 中安装 Pip 包

标签 python macos pip osx-elcapitan

好的,所以我有 brew,并且自 El Capitan 以来我已经 brew 重新安装了 python。

MacBook-Pro-2:decipher Alex$ which python
/usr/local/bin/python
MacBook-Pro-2:decipher Alex$ whereis python
/usr/bin/python

我有两条 python 。这一切都很好。 Brew doctor 很干净,除了在/usr/local/include 中发现了一些 Unbrewed 头文件,这些头文件似乎都与 Python 无关。缺少 virtualenv,还有什么方法可以安装软件包吗?我觉得我可能会遗漏一些东西。

Just like this guy我试图获得 IPython。我真的不需要它,所以前几天我放弃了。现在我需要 Pylint。如果我尝试使用 pip 安装它:

IOError: [Errno 13] Permission denied: '/lib/python2.7/site-packages/logilab_common-1.1.0-py2.7-nspkg.pth'

有谁知道如何将 pip 指向我系统上的另一个 python 实例,或者做其他事情以便我可以恢复旧行为?请问?

-- 编辑 --

建议使用/usr/local/bin/pip 安装 ipython。这是输出。我仍然不知道如何使用 ipython。

MacBook-Pro-2:MNIST Alex$ /usr/local/bin/pip install ipython[all]

Requirement already satisfied (use --upgrade to upgrade): ipython[all] in /Library/Python/2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): traitlets in /usr/local/bin (from ipython[all])
Requirement already satisfied (use --upgrade to upgrade): pickleshare in /usr/local/bin (from ipython[all])
Requirement already satisfied (use --upgrade to upgrade): simplegeneric>0.8 in /usr/local/bin (from ipython[all])
... the rest of the requirements are all satisfied in usr/local/bin

最佳答案

我在 El Capitan 方面也遇到了麻烦。我做了这些事情并且奏效了:

1) 安装自制软件

2) 使用 Homebrew 安装 Python 3

3) 在终端中输入这些安装(按此顺序)

    $ pip3 install pyobjc-core
    $ pip3 install pyobjc
    $ pip3 install pillow
    $ pip3 install pyautogui

关于python - 无法在 El Capitan (10.11) 中安装 Pip 包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33905803/

相关文章:

python - 如何在 anaconda 中将 pip 版本从 10.0.1 升级到 18.0?

python - 无法使用 pip 安装 Pygame

python-3.x - .whl 文件的 Pip 安装只生成 *.dist-info 文件夹

python - 如何解析主机 :port pair in Python

python - 在 pandas 中通过标签选择多列,并非全部按顺序

python - 无法在MacOS上的python中导入opengl.gl

ios - 在 XCode 6.1 中工作的代码在 XCode 6.3 中不起作用

c - 使用命令 "s"时 GDB 不会进入函数

python - 无法从python访问mysql数据库

python - SQL从BEGIN中获取数据; ...;结尾; python 中的 block