Reputation: 131
I try to run pygame in Pycharm. The editor show the library. But if I run the program I get an error that it can't find the module: pygame.
I am running python 3.5
I try it like this:
Thank you
oke, I have done that.See:
So I run again the program:
ok. I am using python: Python 3.4.4.
but if I do this:
pip3 install pygame. I get this warning:
Upvotes: 0
Views: 152
Reputation: 1486
You do not have the PyGame module and even PyCharm suggests it for you.
You do not run pip inside the python IDE. In order to do install a module with pip you have to open the command line and directly run
Pip install PyGame
Or
Python -m pip install pygame
Based on previous answer on a question like yours: Are you sure you have got pygame for Python 3.5? The version for 3.5 wont work and produce this error msg, because the pyd file wont find the python 3.5 dll.
EDIT: since you are installing for python2.7 USE PIP3 to install
pip3 install pygame
Since pygame's pip page is rarely downloaded I suggest you download the module from BitBucket avaivable here.
Upvotes: 0
Reputation: 5783
then install pygame
:
pip install pygame
or:
python -m pip install pygame
or from code:
import pip
pip.main(['install', 'pygame'])
Upvotes: 1