AIHackers / OMOOC2py

开智学堂.Python入门班 第二期

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

安装ipython遇到的问题

leonpak opened this issue · comments

系统

Mac osx 10.11.1 python 2.7.10

思路

1、本来想用pip命令安装,但提示
-bash: pip: command not found
2、改用easy_install ipython安装,但提示
[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-654.pth'
3、再改用sudo easy_install ipython安装,但提示
error: Setup script exited with error in ipython setup command: Invalid environment marker: sys_platform == "darwin" and platform_python_implementation == "CPython"
Uploading 屏幕快照 2015-11-24 下午4.33.04.png…

参考官方文档,
涉及一些编译支持准备的包,要先通过 homebrew 安装好的,
另外,在**,最好 24:00 以后尝试

  • 最近刚刚全新重装Mac OS X 10.11.1和相应开发环境。
  • Python和iPython都是采用Homebrew/Cakebrew(Homebrew的GUI程序)包管理软件来安装的。
    1. 命令行上安装Homebrew (Homebrew是个好东西, 你缺少很多CLI组件/包可以用它来安装,比如Pip)
    2. 然后运行下面命令:
$ brew update # Always good to do
$ brew install zeromq # Necessary for pyzmq
$ brew install pyqt # Necessary for the qtconsole
$ pip install ipython[zmq,qtconsole,notebook,test]
(如果最后行pip还是不可用的话,先执行$brew install brew-pip)

此处参考: https://github.com/nicolashery/mac-dev-setup#ipython

  • 如果不习惯CLI, 也可以使用cakebrew, Homebrew的GUI界面程序
  • 最后安利下Homebrew cask ,可用它来安装很多GUI程序(比如Chrome),让GUI程序安装和卸载都方便,某种程度比Mac App Store还便利。

根据下面@leonpak 出错反馈已更新上面命令。

1、使用brew update更新了homebrew
2、brew install ipython,提示:

Error: No available formula with the name "ipython" 
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.

最后还是通过sudo easy_install ipython安装成功了
1、23点过后
2、翻墙(要不然提示下载超时)

问题解决,Issue 关闭