在python3.5 osx上安装pygame

sim*_*ems 4 python macos pygame

我试图安装pygame

pip3 install hg+http://bitbucket.org/pygame/pygame
Run Code Online (Sandbox Code Playgroud)

收到此错误:

Collecting hg+http://bitbucket.org/pygame/pygame
Cloning hg http://bitbucket.org/pygame/pygame to     /var/folders/vl/g_3vs3xj2clcnyc58spzmjq00000gn/T/pip-7f5mltpu-build
Error [Errno 2] No such file or directory: 'hg' while executing   command hg clone --noupdate -q http://bitbucket.org/pygame/pygame 
/var/folders/vl/g_3vs3xj2clcnyc58spzmjq00000gn/T/pip-7f5mltpu-build
Cannot find command 'hg'
Run Code Online (Sandbox Code Playgroud)

要么

brew install pygame
Run Code Online (Sandbox Code Playgroud)

错误:

Error: Failed to download resource "pygame"
Failure while executing: /usr/local/opt/mercurial/bin/hg clone https://bitbucket.org/pygame/pygame /Library/Caches/Homebrew/pygame--hg
Run Code Online (Sandbox Code Playgroud)

有人用python 3.5在osx上成功安装了pygame吗?

Srg*_*grn 7

你好像缺少mercurial,你可以简单地运行

brew install mercurial
Run Code Online (Sandbox Code Playgroud)

这将安装hg,你可以从mercurial源安装

另外为了安装pygame你需要安装sdl

brew install sdl
Run Code Online (Sandbox Code Playgroud)