使用 homebrew 安装 pyinstaller

Using homebrew to install pyinstaller

我在 OS X 10.10.5 上使用 python 2.7.0 和 pygame 1.9.1。 PyInstaller 的用户指南规定 Mac 用户应该使用 Homebrew,我已经安装了它。我用它来安装 Python 和 Pygame。但是 'brew install PyInstaller' 在终端中输入时根本不会产生任何公式!那么如何使用 homebrew 安装 PyInstaller 呢?这看起来应该很简单,不好意思打扰你,但是我搜索了高低都没有结果。

pyinstaller 文档措辞不当,您可能误解了它们的意思。

PyInstaller works with the default Python 2.7 provided with current Mac OS X installations. However, if you plan to use a later version of Python, or if you use any of the major packages such as PyQt, Numpy, Matplotlib, Scipy, and the like, we strongly recommend that you install THESE using either MacPorts or Homebrew.

意思是说"install later versions of Python as well as python packages with Homebrew",而不是说"install pyinstaller itself with homebrew"。在这方面你是对的,在自制软件上没有 pyinstaller 的公式。

不过您可以使用 pip 安装 pyinstaller:pip install pyinstallerpip3 install pyinstaller。然后使用 pyinstaller --version.

确认安装