Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104839

Re: Interaction between pygame and python

Newsgroups comp.lang.python
Date 2016-03-14 09:53 -0700
References <mailman.89.1457944111.12893.python-list@python.org>
Message-ID <4e99f4f0-c5d6-47ff-b263-87a3656d6d66@googlegroups.com> (permalink)
Subject Re: Interaction between pygame and python
From Rick Johnson <rantingrickjohnson@gmail.com>

Show all headers | View raw


On Monday, March 14, 2016 at 3:28:40 AM UTC-5, Tyson wrote:
> I am having a lot of trouble getting python to find the
> pygame module; my operating system is Windows 7.  Can you
> offer any help?  . Should I download pygame into the same
> folder as Python? . any ideas at all?

If you're new to Python, or even programming in general, i
would highly suggest that you download a pygame executable
installer, and not source code. 

Typically, the you'll want third party libraries, and that's
what pygame *IS*, a third party library, to be installed into
your "PythonXY/Lib/site-packagages" folder. 

If you download and run an installer, one that is
appropriate for your operating system and Python version,
everything will be taken care of for you.

Since you are using Python 3.5.1 on a windows box, you'll
want to download and install the executable named
"pygame-1.9.1-py3.1.msi". You can get it here:

  http://www.pygame.org/download.shtml

Also, have a look at this page for some helpful "getting
started" info:

  http://www.pygame.org/wiki/GettingStarted

After you run the installer, open up a fresh Python shell,
and try to import pygame again. If that import fails, come
back here and post the full traceback.

> Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:38:48)
> [MSC v.1900 32 bit (Intel)] on win32
> 
> >>> import pygame
> 
> Traceback (most recent call last):
> 
>   File "<pyshell#0>", line 1, in <module>
> 
>    import pygame
> 
> ImportError: No module named 'pygame'
> 
> >>> import pygame, sys

Just FYI: importing the "sys" module won't help. If pygame
is not there, it's not there -- plain and simple. 

Now, it could be that you *DO* have pygame installed. but
Python cannot find it. But the best thing for you to do at
this time, is to uninstall any current versions of pygame,
and/or delete any files belonging to pygame from your
computer, and start fresh by running the installer.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Interaction between pygame and python "Tyson" <ttyson@d3ce.org> - 2016-03-13 17:52 -0400
  Re: Interaction between pygame and python Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-14 09:53 -0700
    Re: Interaction between pygame and python Terry Reedy <tjreedy@udel.edu> - 2016-03-14 13:46 -0400
    Re: Interaction between pygame and python Ian Kelly <ian.g.kelly@gmail.com> - 2016-03-14 13:05 -0600
      Re: Interaction between pygame and python Rick Johnson <rantingrickjohnson@gmail.com> - 2016-03-14 15:58 -0700
        Re: Interaction between pygame and python Chris Angelico <rosuav@gmail.com> - 2016-03-15 10:12 +1100

csiph-web