homebrew python和caskroom python之间的区别是什么?

时间:2015-07-26 17:28:24

标签: python homebrew homebrew-cask

页面Installing Python on Mac OS X表明OS X版本可以学习,但不适合编写真正的程序;解决方案 - 从Homebrew安装。

我不认为他们写这个页面时存在caskroom。基本上,我只想安装最佳版本来进行Python编程。

当我进行搜索时,我得到了这个输出:

$ brew search python
boost-python   gst-python     python         python3        wxpython       zpython
Caskroom/cask/mod_python      homebrew/python/vpython           Caskroom/cask/python
homebrew/python/python-dbus   homebrew/versions/gst-python010   Caskroom/cask/python3

这是自制软件的报道:

macosx-10-9:~ vagrant$ brew cask info python
python: 2.7.9
Python
https://www.python.org/
Not installed
https://github.com/caskroom/homebrew-cask/blob/master/Casks/python.rb
==> Contents
  python-2.7.9-macosx10.6.pkg (pkg)

macosx-10-9:~ vagrant$ brew info python
python: stable 2.7.10 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org
/usr/local/Cellar/python/2.7.10_2 (4906 files, 77M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/python.rb

那么,这两个包之间的有效区别是什么?

1 个答案:

答案 0 :(得分:8)

Caskroom python安装来自https://www.python.org/downloads/mac-osx/的Python Mac OS X软件包,因为它们是在那里提供的。

brew install python将从源代码安装在/usr/local/Cellar/python/...和正确的符号链接/usr/local/bin/python下。

后者是“适当的自制方法”(TM),并允许使用brew upgrade进行更新。