4

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

我不认为当他们写这个页面的时候那个密室存在。基本上,我只想安装最适合进行 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

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

4

1 回答 1

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.

于 2015-07-26T17:33:09.543 回答