Import pygame problem | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

Import pygame problem

Iv installed pygame using pip install, but Iv problem using it. When I import pygame on python (looks like it works), it spams this msg: "Hello from python community.."(smth like this),but when I import pygame on pycharm it shows an error.module error (I cant give better details as I have not right now). Hope someone will help me with that

1st Mar 2020, 6:07 PM
Klodi Qoshku
Klodi Qoshku - avatar
4 Respostas
+ 2
The computers at my school havenā€™t updated to the latest Pycharm and Pygame works there. It doesnā€™t work on my PC which is using the latest version, so those articles must be right
1st Mar 2020, 7:04 PM
Jax
Jax - avatar
+ 2
I believe you must import pygame into pycharm through their import system. However, the latest pycharm doesnā€™t actually work with pygame, so it wouldnā€™t be worth the time. To import a module in pycharm, you can either use the built-in console to pip-install, or File->Settings->Project: ProjectName->Project Interpreter. Click the plus button near the right side of the screen and search for your module. Select it, and click Install Package (bottom, left)
1st Mar 2020, 6:23 PM
Jax
Jax - avatar
+ 1
Jax I tryed that to, I tryed to import it through pycharm but it fails. *Im using python 3.8* may its as you said: latest pycharm doesnt work with pygame.somewhere on my my google search Iv seen that,becouse its developing. *apologise for the grammar
1st Mar 2020, 6:27 PM
Klodi Qoshku
Klodi Qoshku - avatar
+ 1
I fixed it -_- I didnt notice that my python was 32 bit and pycharm 64 bit. Once I installed python 64 it worked
5th Mar 2020, 7:49 PM
Klodi Qoshku
Klodi Qoshku - avatar