LoginSignup
3
4

More than 5 years have passed since last update.

macOSにpygameをインストール

Last updated at Posted at 2018-10-08

以前Macでpygame動かすのは色々めんどくさかった記憶があるのだけど、今はpip使って簡単にバイナリをインストールできるのね。拍子抜け。

使用するpythonのバージョンは3.6.1以降推奨。

$ python3 --version
Python 3.7.0
$ mkdir pygame_project
$ cd pygame_project
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install pygame
Collecting pygame
  Using cached https://files.pythonhosted.org/packages/b9/89/aca02f8771727c2713c11a39c1cc295e4deb60be322be19ad7460570f978/pygame-1.9.4-cp37-cp37m-macosx_10_11_intel.whl
Installing collected packages: pygame
Successfully installed pygame-1.9.4

サンプルを起動して動作を確認。

$ python3 -m pygame.examples.aliens
3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4