Skip to content
Sign upLog in
← Back to Community
Repl.it: Package operation failed.
Profile icon
RainBowLion1

Hello im trying to learn pygame but when i try to import it in any way in says Repl.it: Package operation failed.i looked and found a few posts about it but there all 6+ months old can someone help me? Thanks.

Answered by JBloves27 [earned 5 cycles]
View Answer
Voters
Profile icon
RainBowLion1
Comments
hotnewtop
Profile icon
JBloves27

Did you maybe tinker with the module file? Try deleting the package file and then pressing run again

Profile icon
RainBowLion1

@JBYT27
it makes a new file and the same problem happens.

Profile icon
JBloves27

Did you make a pygame repl? Maybe the module ro replit is having problems now, try later?

@Rainbowryan

Profile icon
RainBowLion1

@JBYT27
i just made a new Replit and copy and pasted the code from the old one. Thanks (Ik replit is weild)

Profile icon
JBloves27

np! yeah, these kind of errors have happened to me to as well. Next time, maybe you should try doing the same if this error comes up ;)

@Rainbowryan

Profile icon
tussiez

@JBYT27
Yay, thanks for giving Rainbowryan the answer
I couldn't figure it out XD

Profile icon
JBloves27

lel, np. XD

@tussiez

Profile icon
RainBowLion1

"This is normal python stuff"

Profile icon
JBloves27

hahaha XD

@Rainbowryan

Profile icon
tussiez

Have you checked your packager file?

Profile icon
RainBowLion1

@tussiez
i dont understand what you mean?

Profile icon
tussiez

Look at pyproject.toml. Does it have any errors here?

@Rainbowryan

If not, report this on https://repl.it/bugs.

Profile icon
RainBowLion1

@tussiez
how whould i know if theres a error im new to this proramming stuff.

Profile icon
RainBowLion1

@tussiez
wait when i lanch it in pyproject.toml for 2 secs it says pygame = "^2.0.1"
is this the problem?

Profile icon
tussiez

@Rainbowryan
Hmm.. unfortunately I'm not very good at Python, wait a bit for others to post :/

Profile icon
JBloves27
Profile icon
tussiez

@Rainbowryan
Possibly

Profile icon
tussiez

@JBYT27
Huh?

Profile icon
JBloves27