使用Python 3.6在Mac High Sierra上安装PyGame

时间:2018-05-19 22:44:06

标签: python pygame install homebrew

我在我的终端上安装了Homebrew,但我被困在这里。它没有重新调整Homebrew。有人可以帮助我为Python 3.6安装Pygame for Mac High Sierra。

Last login: Wed May  9 17:03:33 on console
macs-MacBook-Pro:~ Kyle$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/bin
==> The following existing directories will have their owner set to Kyle:
/usr/local/bin
==> The following existing directories will have their group set to admin:
/usr/local/bin
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Homebrew
/usr/local/Frameworks
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/opt
/usr/local/sbin
/usr/local/share
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var
==> The Xcode Command Line Tools will be installed.

Press RETURN to continue or any other key to abort
macs-MacBook-Pro:~ Kyle$ brew install python3

-bash: brew: command not found

1 个答案:

答案 0 :(得分:0)

根据终端的输出,似乎Homebrew的安装没有正确完成。

实际上,作为安装的一部分,Homebrew安装程序会尝试安装" Xcode命令行工具"。为此,它要求你按" RETURN"确认您同意安装这些密码,然后要求您输入密码以获得执行此操作的权限。也就是说,如果按RETURN并输入密码,那么Homebrew安装程序应该能够完成。

安装Homebrew后,您可以使用minute命令安装Python,类似于您的第一次尝试:

brew

请注意brew install python 安装Python 3.如果您希望安装Python 2,请使用brew install python