Oct
16

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:

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. 🙂

 

 

Written by connygy. Posted in python

Trackback from your site.

Leave a comment