Monday 7 December 2015

Install PyGame on MacOS

Prerequisite
Before installing, download and install xquartz from following location

After installing xquartx run following command.
ln -s /opt/X11/include/X11 /usr/local/include/X11

Following is the step-by-step procedure to insyall pygame.

Step 1: Install Mercurial. Download it from following site and install.


After installation, open terminal and type the command hg. You will get following kind of output.

$ hg
Mercurial Distributed SCM

basic commands:

 add           add the specified files on the next commit
 annotate      show changeset information by line for each file
 clone         make a copy of an existing repository
 commit        commit the specified files or all outstanding changes
 diff          diff repository (or selected files)
 export        dump the header and diffs for one or more changesets
 forget        forget the specified files on the next commit
 init          create a new repository in the given directory
 log           show revision history of entire repository or files
 merge         merge another revision into working directory
 pull          pull changes from the specified source
 push          push changes to the specified destination
 remove        remove the specified files on the next commit
 serve         start stand-alone webserver
 status        show changed files in the working directory
 summary       summarize working directory state
 update        update working directory (or switch revisions)

(use "hg help" for the full list of commands or "hg -v" for details)

Step 2: Grab the source. Run following command.


Step 3: Finally build and install.

$ hg clone https://bitbucket.org/pygame/pygame
destination directory: pygame
requesting all changes
adding changesets
adding manifests
adding file changes
added 3440 changesets with 14878 changes to 1792 files (+11 heads)
updating to branch default
641 files updated, 0 files merged, 0 files removed, 0 files unresolved


Run following commands.
cd pygame
python3 setup.py build
sudo python3 setup.py install



Previous                                                 Next                                                 Home

No comments:

Post a Comment