[Tutor] A Problem with pygame
Mats Wichmann
mats at wichmann.us
Sun Nov 17 14:39:01 EST 2019
On 11/17/19 10:02 AM, Mikael Lenander wrote:
> Hi!
> I have a problem concerning the site package "pygame". I have tried to use
> it in Pycharm in order to create simple games but it doesn't work. I tried
> to download it through Pycharm settings/Project Interpreter but it didn't
> work (see photo 1). Then I downloaded it through the command prompt and it
> actually worked (see photo 2). But when I try to import the module through
> Pycharm, it claims that the module pygame doesn't exist (see photo 3). So
> what is the problem and what should I do?
This problem is *always* paths.
In Pycharm, click "Python Console". Type:
import sys
sys.path
From the command prompt type (Note: if this is Windows, substitute "py"
for "python"):
pythom -m pip list # make sure it actually shows pygame
python
>>> import sys
>>> sys.path
what's different?
More information about the Tutor
mailing list