繁体   English   中英

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

[英]Installing PyGame on Mac High Sierra with Python 3.6

我在我的终端上安装了Homebrew,但是我被卡在这里。 它不会重新确认自制软件。 有人可以帮助我,以便使用Python 3.6安装Mac High Sierra的Pygame。

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

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

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

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

brew install python

请注意, brew install python会安装Python3。如果要安装Python 2,请使用brew install python@2

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM