Skip to content
Sign upLog in
← Back to Community

Why do libraries keep uninstalling themselves?

Profile icon
DwellerIgor

Hi there! I have discord.py bot and it is supposed to check if twitch streamer is live or not every 10 seconds, but in 10 minutes bot stops working (while I host it) and when I start my bot it reinstalls every library. Sometimes bot just stops working because some of the libraries keep uninstalling itself, so bot can't work 24/7. And some libraries like twitchAPI are not included in repl.it ,so I install them via console(shell) and in 10 minutes library uninstalls and I need to install it using console again. So the questions is: how to prevent libraries from uninstalling themselves?

Voters
Profile icon
FireTheLost
Profile icon
EmeraldThunder
Profile icon
DwellerIgor
Comments
hotnewtop
Profile icon
VulcanWM

When the bot switches off it restarts which means packages have to install again.
Just add flask to your bot and add uptimerobot to the url and it will stay up 24/7

Profile icon
DwellerIgor

thank you!


@VulcanWM

Profile icon
VulcanWM

np! Just mark the comment as the answer

@DwellerIgor

Profile icon
DwellerIgor

wait. it doesn't work anymore. I have flask, but in 10 minutes library seems to uninstall itself and I get: "Your Replit is waking up". So still it doesn't work even with flask. any other suggestions?

@VulcanWM

Profile icon
DwellerIgor

maybe you have discord. it will be much easier to communicate.

@VulcanWM

Profile icon
Coder100

Libraries are big, so they get deleted.

But they get reinstalled each time you run the repl.

Profile icon
DwellerIgor

yes, but libraries like twitchAPI need to be installed using shell. I about 10 minutes replit forgets that i installed twitchAPI and just stopes working. How to fix that? It happens with libraries I install in shell

@Coder100

Profile icon
Coder100

sure, you could use the .replit file to configure installing it each time you run

@DwellerIgor

Profile icon
DwellerIgor

why does my bot stop working for no reason and then ask me to install everything again? Why? Just tell me please how to solve this

@Coder100

Profile icon
Coder100

like i said
they delete the libraries to save space!

@DwellerIgor

Profile icon
Coder100

so, in your .replit file, add this:

run = "<command to install your lib> ; python main.py"

@DwellerIgor

Profile icon
DwellerIgor

thank you very much. sorry

@Coder100

Profile icon
Coder100

np
sorry if i was hard to understand

@DwellerIgor