solution for installing pygame
I have two computers, the one has windows system at home, the other has ubuntu system in my office. In each computer, I have two python, the one is normal python, the other is anaconda.
I try to install the pygame on both computer, then I got in chaos. My computer can not find it, even I installed pygame with pip several times.
After some effort, I got the solution:
download the pygame binary distribution for your operating system:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
Windows:
- For normal python: pip install your_download_path\downloaded_pygame
- For anaconda python:
- use the anaconda pip
- pip install your_download_path\downloaded_pygame
Linux:
- Set your environment variable:
- export VARIABLE
for example:- export PATH = …
- export PYTHONPATH =
- append a path: export PATH = $PATH:other_path
- export VARIABLE
- check your path:
- echo $VARIABLE
- links:
- use pip do the same like in windows
- pip install your_download_path\downloaded_pygame
- or double click the downloaded .deb file
Setting in Eclipse:
In eclipse, you can set the python interpreter by yourself
- In menu: Project -> Properties -> pyDev-Interpreter/Grammar -> Click here to configure an interpreter not listed -> New -> …
- you can also set PYTHONPATH: Project -> Properties -> pyDev-PYTHONPATH (you can also set the external library here)
check the loaded packages in project:
- In the “PyDev Package Explorer” viewer:
- under all the project file, your can see your python interpreter name, double click, all the installed packages are listed here. 🙂