1

I am trying to run pygame on the PyCharm IDE, I have installed the latest version of pygame for python 3.5 and have added it to the project interpreter. I installed pygame from http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame and copied it too python35-32/Scripts/. The test program below runs fine in the python shell but I want to run it from PyCharm.

I have been trying to solve this for the past hour and I've hit a wall. When I run this simple test program to see if pygame is working:

import pygame

pygame.init()
pygame.display.set_mode((800, 800))

I get this error:

Traceback (most recent call last): 
  File "C:/Users/jerem/PycharmProjects/Games/hello_pygame.py", line 1, in <module>
    import pygame
  File "C:\Users\jerem\AppData\Roaming\Python\Python35\site-packages\pygame\__init__.py", line 141, in <module>
    from pygame.base import *
ImportError: No module named 'pygame.base'

Any help would be greatly appreiciated! Thanks again, JC

jcarder
  • 164
  • 4
  • 17

2 Answers2

0

Follow the instructions provided here. I think its related to the problem you are having on pygame and PyCharm on windows. How do I download Pygame for Python 3.5.1?

Community
  • 1
  • 1
Amin Etesamian
  • 3,363
  • 5
  • 27
  • 50
0

its bcus pycharme has not recognised you're env or working on wrong env here how it looks like

https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html check this

Devsidhu
  • 11
  • 2
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/33315400) – LSeu Dec 08 '22 at 10:41