I have been using PyCharm on Ubuntu to run some Python code, where in Edit Configurations
I specified the interpreter path as /usr/bin/python2.7
. The code uses the pygame
module, and so to install this, I also ran sudo pip install pygame
. Then I used import pygame
in my Python script, and the file ran ok.
However, I now want to use Python 3.4. So, in PyCharm, I specified the interpreter path to be /usr/bin/python3.4
. However, when I run the same file, I now get the error: ImportError: No module named 'pygame'
.
Can somebody explain why this is happening? How can I get my Python 3.4 interpreter to find Pygame?
Thanks!