我在 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.
意思是说“用 Homebrew 安装 Python 的更高版本以及 python 包”,而不是说“用 homebrew 安装 pyinstaller 本身”。在这方面你是对的,在 Homebrew 软件上没有 pyinstaller 的公式。
您可以使用 pip 安装 pyinstaller:pip install pyinstaller 或 pip3 install pyinstaller。然后使用 pyinstaller --version 确认安装。
