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


Groups > comp.lang.python > #104839

Re: Interaction between pygame and python

X-Received by 10.140.97.244 with SMTP id m107mr18937001qge.20.1457974432280; Mon, 14 Mar 2016 09:53:52 -0700 (PDT)
X-Received by 10.50.98.70 with SMTP id eg6mr298616igb.4.1457974432239; Mon, 14 Mar 2016 09:53:52 -0700 (PDT)
Path csiph.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!w104no6693757qge.1!news-out.google.com!k1ni18547igd.0!nntp.google.com!nt3no1629927igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups comp.lang.python
Date Mon, 14 Mar 2016 09:53:51 -0700 (PDT)
In-Reply-To <mailman.89.1457944111.12893.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=172.58.105.188; posting-account=h3aEwQoAAACiuqX-oR3gvCVFm8lLHoWj
NNTP-Posting-Host 172.58.105.188
References <mailman.89.1457944111.12893.python-list@python.org>
User-Agent G2/1.0
MIME-Version 1.0
Message-ID <4e99f4f0-c5d6-47ff-b263-87a3656d6d66@googlegroups.com> (permalink)
Subject Re: Interaction between pygame and python
From Rick Johnson <rantingrickjohnson@gmail.com>
Injection-Date Mon, 14 Mar 2016 16:53:52 +0000
Content-Type text/plain; charset=ISO-8859-1
Lines 55
Xref csiph.com comp.lang.python:104839

Show key headers only | 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