Question:
Why are Repls so large? A completely blank python Repl is 0.3 Gb?! This seems to only happen recently after they change/upgraded to Nix
Repl link:
https://replit.com/@JasonLiu6166/Test
Screenshots, links, or other helpful context:
There’s only 10GB of storage, and I’m pushing towards that.
I will most likely subscribe for more storage, but this doesn’t feel right.
Hi @JasonLiu6166 , welcome to the forums!
A Python file has lots of unnecessary modules already installed, but you can try removing them in the poetry.lock
and see if that works.
Hope this helps!
That shouldn’t have any effect, as that file is automatically generated/re-generated based on your pyproject.toml
file.
1 Like
Ok, but remove any files that store extensive modules.
NateDhaliwal:
remove any files
If you remove pyproject.toml
, that’ll break the packager.
1 Like
No, as in remove these modules in pyproject.toml:
It’ll work, right?
1 Like
requests
is necessary for poetry to function, which the packager uses. (Which makes poetry required as well)
If you use the Debugger, then you need debugpy
as well.
If you want code checks, you need the replit-python-lsp-server
as well.
urllib3
is also required for poetry
Leaving you these options for removal:
numpy
flask
3 Likes
The old python files used to be a few megabytes.
The new ones are 0.3 gb when blank…
I tried removing numpy and flask, but it had no effect n file size
I made a python repl and deleted only debugpy and it’s at 0.13 GB
2 Likes
Explorers have gotten access to a new Python template which seems to use less than 50 MiB of storage. Hopefully, that will ship out to everyone soon, as it’s a big improvement compared to the old venv
.
Not to mention packages, but every Python Repl includes a venv (virtual environment) with every binary and stuff that is required to use Python. One of the reasons being that package installations are not possible without root access, which Replit does not provide.
It looks like Replit does not use a venv anymore.
I just ran a test, which would display the most spacious file in the directory. This is on the Beta Python template, which is only accessible if Explorer is enabled.
[Screenshot 20…
5 Likes
Is it the one titled “Python (Beta LSP)”?
1 Like
I don’t think so, I think it’s the other one. (Could be wrong though, someone feel free to correct me)
2 Likes
It’s just the default Python template, but only explorers have access to it. There’s basically two versions of that template, explorers get the new beta version, everyone else just gets the old version.