"No module named pygame.base" - pygame and pypy

Asked

Viewed 201 times

0

After several attempts and errors, I was able to install pygame 1.9.2a0 in pypy3, downloading the current version via Mercurial and installing via /path/pypy3 setup.py

But when giving import, I get the following error:

Traceback (most recent call last):
  File "/home/rafael/PycharmProjects/pygame-teste/__init__.py", line 3, in <module>
    import pygame
  File "/opt/pypy3-2.4.0-linux64/site-packages/pygame/__init__.py", line 133, in <module>
    from pygame.base import *
ImportError: No module named pygame.base

This error also happened frequently before in python3 (when I used Debian Wheezy), but it worked well on Pycharm. Now that I am using Jessie and pygame works perfectly in python3, this error appears pro pypy (and even Pycharm does not work)

Any idea?

  • Managed to solve your problem?

  • negative, I ended up giving up the pypy

1 answer

0

Install pygame via PIP.

If you are using a UNIX/GNU/Linux style operating system you can install pygame via PIP:

1) PIP installation

A) If no PIP is installed:

sudo apt python install-Pip

B) Also to install it in windows... just download this file:

https://bootstrap.pypa.io/get-pip.py

Go to the folder where the file was saved and run a command console:

python get-pip.py

2) finally execute:

pip install pygame

Browser other questions tagged

You are not signed in. Login or sign up in order to post.