簡體   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