I want to use pyserde, but upm is installing [serde] (can’t link because max two links but it’s on PyPi).
Expected behavior:
Because I poetry install pyserde, UPM is smart enough to understand that library provides serde.
Actual behavior:
I presume UPM is seeing import serde but no serde in the poetry.lock, and is and so is installing it. Then my code fails because serde does not include features which are in pyserde.
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. https://docs.replit.com/programming-ide/installing-packages#guessing-failures
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.