2

In the official site of the pygame, pygame.org there is no supported version of the pygame for the python3. While I need my pygame to be written in the python3, I make a search in the site, and on the web, but nothing found. The only tutorial for installing the pygame for python3 in Mac OS X was that site.

When I follow this - installation with the brew - there are several problems. Firstly: brew install sdl sdl_image sdl_mixer sdl_ttf smpeg portmidi gives me the error :

Error: No available formula for smpeg 
Searching taps...

Also with the command /usr/local/share/python3/easy_install pip the terminal says that there is no folder in this location.

Cheers.

0

1 Answer 1

1

Your problem is that you're following a blog post that's years out of date, and now very inaccurate. I can tell you all the obvious things it's got wrong, and what's causing your specific errors; I can't guarantee that fixing those things will make it work.


Homebrew's Python packages include pip, so you should not try to install it. If you want to upgrade it, you should use pip itself to do so, as explained in the output when you ran brew install python3. (If you missed it, you can just brew unlink python3 then brew link python3 again, install of re-building and -installing it.)


The Python packages also don't put binaries in /usr/local/share/python[3] anymore. By default, it will instead install them into the cellar directory, but then symlink them into /usr/local/bin. However, instead of relying on the defaults as of late 2013: When you do the brew install python3, if it gives you a path to put on your PATH, do it; otherwise, it should just work.


pip is installed pip3 and pip-3.3, so (unless you have another Python 3.3—which you shouldn't), you should be able to—and should—just run pip-3.3, rather than typing an absolute path.


Homebrew hasn't included smpeg for a long time. I'm pretty sure PyGame's 3.x port doesn't handle MPEG-1 videos properly anyway, and even for 2.x, they no longer list it as a requirement on the MacCompile page or anywhere else. And, even if it does support smpeg, do you really need to play MPEG-1 videos in your game? If not, just don't install smpeg.

If you do need it, you can install it as a head-only package. See #18195 for some details.


Also note that if you're planning to use py2app or similar tools to distribute your game to other people, you will want the python.org binary installer for Python, and possibly also want the libsdl.org binary SDK for SDL. Otherwise, you end up with packages built specifically for your system, which will likely not run on an earlier OS X, and may not even run on another OS X of the same version. If you know what you're doing with Mac OS X SDKs, you can fix this yourself, but if you don't already know how to do that, now is not the time to learn.


Finally, if you can't install all the prerequisites you think you need, the PyGame setup process will tell you what's missing, so you can just run it and see what it can't find, and decide which of those, if any, are important to you.

Sign up to request clarification or add additional context in comments.

1 Comment

Cheers. All these looks very draft things, I mean the reason I want the pygame with python3 is for university purposes. If this is not official supported I don't want to risk with a "patent" of installing pygame on python 3.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.