Installing Python 3 and Pygame on OS X / Mac Platform

  • Published on Dec 22, 2014
  • This shows how to install Python and Pygame on a Mac. See for the supporting web page on how to do this.

Comments • 36

  • Handmade Studios
    Handmade Studios Year ago

    When I try to install "hg clone" it comes up with this error "abort: error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)" Can I fix this somehow?

  • Digiphex Electronics

    On step 8 my computer says -bash: hg: command not found

  • Garrison Miller
    Garrison Miller Year ago

    WORKED SMOOTHLY!!! Probably the first time that something like this worked perfect!!

  • Will CM
    Will CM Year ago

    Thanks bro 🙏🙏🙏🙏🙏

  • noxiuc
    noxiuc Year ago

    Thanks so much! I had tried everything and nothing worked until I found this video!

  • Margarita Koreneva
    Margarita Koreneva 2 years ago

    Great book and good video! thx!!

  • Barry Thorpe
    Barry Thorpe 2 years ago +2

    Followed the directions precisely and still ended with:
    ModuleNotFoundError: No module named 'pygame'

  • Ruthvik _Rajesh
    Ruthvik _Rajesh 2 years ago +1

    I get this when i type gcc can anyone help me
    clang: error: no input files

  • Tom Martinek
    Tom Martinek 2 years ago

    Once I run the pip3 install /Users/tom/Downloads/pygame, it spits out a bunch of stuff and then fails with this error:
    /usr/local/include/pngconf.h:45:12: fatal error: 'stdio.h' file not found
    # include
    1 error generated.
    error: command '/usr/bin/clang' failed with exit status 1

  • Francisco Guerra
    Francisco Guerra 2 years ago

    I cannot get it to work. I guess cause my Mac is 64bit?!

  • Kupfer
    Kupfer 3 years ago

    Thanks for this tutorial! I'm really interested in game making and I'm pretty good at python, so I though I could try this out :) I haven't really found a good video like this which explains everything so clearly, thanks!

  • Kupfer
    Kupfer 3 years ago

    Will this download a copy of python if I have already installed it on my computer?

    • Kupfer
      Kupfer 3 years ago

      Don't worry, it worked :)

  • Micheal Jordan
    Micheal Jordan 3 years ago

    Thank you so much!

  • ArthurThered
    ArthurThered 3 years ago +1

    PYTHONPATH entry '/Library/Frameworks/Python.framework/Versions/3.5/bin/python3' is not a directory , someone could help, please?

    SDEFSS 3 years ago

    -bash: gcc: command not found - and cant download the brew without it, i tried, what should i do.

    • SDEFSS
      SDEFSS 3 years ago

      +Professor Craven i've tried that already, it doesn't

    • Professor Craven
      Professor Craven  3 years ago

      +kristopher hunt Try typing "xcode-select --install" in the terminal. Let me know if that works.

  • David Liu
    David Liu 3 years ago

    ==> Pouring mercurial-3.7.3.yosemite.bottle.tar.gz
    Error: An unexpected error occurred during the `brew link` step
    The formula built, but is not symlinked into /usr/local
    Permission denied - /usr/local/lib/python2.7/site-packages/hgext
    Error: Permission denied - /usr/local/lib/python2.7/site-packages/hgext

  • Modern Designs
    Modern Designs 3 years ago

    thank you so much helped alot!

  • justin jimenez
    justin jimenez 3 years ago

    before i do this just to clarify, this is to make pygame for python 2.7 run better with python 3.4?

  • Jyoti Gupta
    Jyoti Gupta 3 years ago

    Hi Craven,
    Thanks for video, But when I try to run 'hg clone' it is giving me error "no module utils".

    • H0n3yM0nst3rr
      H0n3yM0nst3rr 3 years ago

      +Jyoti Gupta I am having the same problem.

  • Jaideep Y
    Jaideep Y 3 years ago

    I followed this and installed pygame. However, when i type import pygame into WingIDE it says 'ImportError: No module named pygame'. Why is this happening?

    • Professor Craven
      Professor Craven  3 years ago

      +Jaideep Y It is finding version 2.x of python instead of version 3.x. You need to find where it installed Python3 on your computer and point Wing to that. If I remember correctly you can type "which python3" on the terminal and see where it is.

  • Factorous Factorous
    Factorous Factorous 3 years ago +1

    Can someone help me for the last step:
    When I run thé pip3 install command it says :
    -bash : /usr/local/bin/pip3: /usr/local/opt/python3/bin/python3.5: bad interpreter: no such file or directory .
    Does someone knows how to fix this problem . And you have to know that I installed Python from another link before doing this so I have two Python 3 . Do I have to delete one .
    Thank you for your answer .

  • Emily Zhou
    Emily Zhou 4 years ago

    I installed pygame;however, when I import pygame, it says there is no module. When I go on terminal and type python3. Next I type import pygame and it doesn't do anything (which I guess it means it works). What do I do?

  • zhu alice
    zhu alice 4 years ago

    I can't do step 7, coz terminal can't find python3. it shows "python3-3.4.3_2 already installed, it's just not linked", when i try install python3 again. and when try to "hg clone", it shows "python: posix_spawn: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/ No such file or directory". How I can link python3? Thanks!

  • Daniel Castro Pineda
    Daniel Castro Pineda 4 years ago

    Hi there is any way to uninstall and install again the home brew? I tried to install it yesterday but, mi internet connection got issues and i couldn't be able to finish the installation, and today I try again to do the whole thing and again got trouble.
    Is dare a .dmg file for pyGame, or any other way to complete the installation?

  • Jens Donlin
    Jens Donlin 4 years ago

    This worked however my path has been broken when I installed anaconda.
    Any idea on where to install pygame. If I have anaconda's python3 installed ?

  • NeverUsedTier
    NeverUsedTier 4 years ago

    hm weird when i type in gcc i get this:
    clang: error: no input files
    and i have gone through learn python the hard way if youre aware of that so i have been using easy_install. i tried to do 'easy_install gcc' and still got nothing. any ideas on why this happened?

    • Professor Craven
      Professor Craven  4 years ago +1

      Then you already have gcc installed. Skip to the next step.