Help with modules

When importing modules in python it says they do not exists, do not know what is going on.

Hi @py6248717476

Can you please post the code which is giving you the error, as well as the Traceback you’re getting when attempting the import?

When you post your code here for us to look at, please make sure to use the </> (code) button in the editor.
capture

This will insert a new block into your post, where you can paste your code and the forum will keep all the formatting (whitespace etc) correct so we can copy it and run it for troubleshooting. (This is especially important in Python, because otherwise the forum won’t keep your indenting and that’s a big no-no for Python!) Like this:
capture_r

Once we’ve got the code and we know more exactly what your problem is, we’ll try and help. :slight_smile:

import numpy
import pygame

Traceback (most recent call last):
File “C:/Users/robertw27/.PyCharmCE2019.1/config/scratches/Howdy.py”, line 1, in
import pygame
ModuleNotFoundError: No module named ‘pygame’

In the terminal it says that numpy and pygame are already installed so I am unsure.

“The terminal” isn’t a thing.
Who said it?
Maybe you started python and successfully imported it.
If you then start python and don’t successfully import it, then, you started a different python, didn’t you.

Are you saying I am using a different version of python?

How do I change the version I am using on pycharms?

I don’t use it, so no clue. But it’s got menu’s to browse through doesn’t it. (You’ve also got google)

1 Like