For some reason, no matter what, it seems as though trying to install the “rembg” / remove background module in Python always results in failure.
The error has to do with dependency conflicts.
After trying to manually revert the version of the “typing_extensions” module (Rembg isn’t compatible with typing_extensions version 4.0.0 yet), Python simply reinstalls the latest version of “typing_extensions.”
Is there something much more obvious that I’m missing? Attached is the final implementation I attempted before making this post. TIA!
I deleted the Replit in question because it had one line: “import rembg”. Besides that, the project was a boilerplate Python repl.
I’ve tried downloading through both Replit’s packages manager and the CLI. I’ve also tried manually rewriting dependency files and cloning working GitHub builds using the “rembg” module into Repl.
Although the article itself didn’t include the solution, it led me to finding out the error.
It turns out that ONNXRuntime, a rembg dependency, requires PyTorch & TensorFlow to run, the latter of which is too large to fit onto the disk of a free Repl.
Because of that, I’m pretty sure that use of “rembg” is reserved for boosted Repls.
rembg should be compatible with v4 even if the constraint says otherwise; typing_extensions v4 only breaks stuff on python <=3.6. Remove rembg and install it in shell: