I have been trying to install pygame for 3.3 and 3.4 and can't find a way to install it probably with out it giving a error when I do pygame.init().
Is it because pygame.init() is not the proper code or is it because I installed it incorrectly? If so, can someone tell me how to install it?
You can find binary installations for pygame for python 3.4 on windows here. I'm not sure where you could find it if you're running a different operating system.
Check out downloads on their bitbucket repo (for windows):
https://bitbucket.org/pygame/pygame/downloads
On Windows: open your comandline and type:
pip install pygame
On Debian-based Linux type into your terminal:
sudo apt-get install python-pygame
I would recommend Gohlke's precompiled pythonlibs in wheel format :) pygame from Gohlke
I was never let down by those libraries and I used numpy, scipy, scikit-learn etc. (and pygame as well) extensively, which are one of the tougher to build on windows ;)
Related
I have been trying to install pygame for 3.3 and 3.4 and can't find a way to install it probably with out it giving a error when I do pygame.init().
Is it because pygame.init() is not the proper code or is it because I installed it incorrectly? If so, can someone tell me how to install it?
You can find binary installations for pygame for python 3.4 on windows here. I'm not sure where you could find it if you're running a different operating system.
Check out downloads on their bitbucket repo (for windows):
https://bitbucket.org/pygame/pygame/downloads
On Windows: open your comandline and type:
pip install pygame
On Debian-based Linux type into your terminal:
sudo apt-get install python-pygame
I would recommend Gohlke's precompiled pythonlibs in wheel format :) pygame from Gohlke
I was never let down by those libraries and I used numpy, scipy, scikit-learn etc. (and pygame as well) extensively, which are one of the tougher to build on windows ;)
I have been trying to install pygame for 3.3 and 3.4 and can't find a way to install it probably with out it giving a error when I do pygame.init().
Is it because pygame.init() is not the proper code or is it because I installed it incorrectly? If so, can someone tell me how to install it?
You can find binary installations for pygame for python 3.4 on windows here. I'm not sure where you could find it if you're running a different operating system.
Check out downloads on their bitbucket repo (for windows):
https://bitbucket.org/pygame/pygame/downloads
On Windows: open your comandline and type:
pip install pygame
On Debian-based Linux type into your terminal:
sudo apt-get install python-pygame
I would recommend Gohlke's precompiled pythonlibs in wheel format :) pygame from Gohlke
I was never let down by those libraries and I used numpy, scipy, scikit-learn etc. (and pygame as well) extensively, which are one of the tougher to build on windows ;)
Currently unable to install Pygame via pip:
pip install pygame
Getting this message:
Concerned by it being termed an EOF error, is this an error in the module itself?
There's dev versions available as of now. Get them via
pip install pygame==2.0.0.dev6
Pygame is not compatible with Python 3.8 at the moment. I would recommend you to downgrade back to 3.7 and installing with pip there.
pip is doesn't have pygame up.
But there is a alternative that worked for me. https://www.pygame.org/wiki/CompileWindows
Read and follow the steps correctly and it should install.
you also need to update your code to pygame 2.0.0 code because it's only for 3.8
BTW you have to follow the SDL2 instructions since pygame 2.0.0 uses that.
the above commands worked for me today 3-15-20 with Python-3-8-0 on Linux Mint 19
to get IDLE to recognize pygame.
sudo pip3 install pygame==2.0.0.dev6
I also had to update pip first with
sudo pip3 install --upgrade pip
Pygame requires visual studio C++ build tools to install. Ensure you have these downloaded from here.
Open power shell window and make sure your internet is on
Then type the following command
pip install pygame
It will automatically download it for you and also install it
Again make sure your internet is on
I have python 3.8.2 and it worked on my pc
Currently unable to install Pygame via pip:
pip install pygame
Getting this message:
Concerned by it being termed an EOF error, is this an error in the module itself?
There's dev versions available as of now. Get them via
pip install pygame==2.0.0.dev6
Pygame is not compatible with Python 3.8 at the moment. I would recommend you to downgrade back to 3.7 and installing with pip there.
pip is doesn't have pygame up.
But there is a alternative that worked for me. https://www.pygame.org/wiki/CompileWindows
Read and follow the steps correctly and it should install.
you also need to update your code to pygame 2.0.0 code because it's only for 3.8
BTW you have to follow the SDL2 instructions since pygame 2.0.0 uses that.
the above commands worked for me today 3-15-20 with Python-3-8-0 on Linux Mint 19
to get IDLE to recognize pygame.
sudo pip3 install pygame==2.0.0.dev6
I also had to update pip first with
sudo pip3 install --upgrade pip
Pygame requires visual studio C++ build tools to install. Ensure you have these downloaded from here.
Open power shell window and make sure your internet is on
Then type the following command
pip install pygame
It will automatically download it for you and also install it
Again make sure your internet is on
I have python 3.8.2 and it worked on my pc
I tried to install pygame via pip but this fails. Based on my google searches, it sounds like easy_install also fails.
I also checked out: http://www.pygame.org/wiki/MacLionCompile but the solution is incomplete.
I'm running python 2.7.1 bundled with Lion.
Suggestions? Appreciate the help.
You could try the binary package for Lion, available on the pygame website.
It worked for me (OSX 10.7.1 with bundled Python 2.7.1)
See the answer from this question: PyGame in a virtualenv on OS X with brew?
Essentially, the PyGame in PyPy hasn't been updated for a while.
The version in the repository has updated build scripts that handle Pythonbrew, virtualenv and other utilities.
The pip command to use is:
pip install hg+http://bitbucket.org/pygame/pygame
Just for the sake of anyone that googles this question, my lab has a wiki set up with instructions for installing Pygame with just about any configuration:
http://smash.psych.nyu.edu/labwiki/PyGameSetup
I had good luck with macports:
Install macports if you don't already have it: http://www.macports.org/
Install python via macports: sudo port install python26. I typed in the command it said at the end to set it as my default python installation. If you don't, then in step 4 you'll have to run the app a different way.
Install pygame: sudo port install py26-game
Run your pygame app: python main.py
I have been looking for this for myself and I stumbled upon this build that happens to work. I am using OSX 10.8.3 and python 2.7.
http://inside.catlin.edu/moodle/mod/resource/view.php?id=16736