Upm installing wrong package

There is a fix (click to view easier):


import pygame  #upm package(pygame-ce)

Why is this happening?
UPM is replit’s Universal Package Manager. Yes, it is for all languages. Python is kind of unique in that the import statement does not necessarily match the package name (as you’ve experienced). UPM looks in your code and tries to make a big list of package names you import. This obviously might not work for python.
Normally, you are able to disable import guessing so it won’t install random stuff, but the configuration is (probably still) broken right now. See the above topic and topics linked in that topic for more info.

edit: configuration is available again, see:

1 Like