How do I stop poetry.lock from populating every time I create a python project?

My repls keep getting a file that says it is “poetry lock” how can I stop this as it is very time consuming to let it run for like 3 seconds before actually using the program? Or having to remove it every time I start a new repl is annoying.

It does: → poetry lock --no-update
Resolving dependencies…

before running

Hi @jlee860y , welcome to the forums!
Try running poetry update and poetry lock in the Shell and see if this goes away.

I tried that but still get it.
Is there a way I can remove poetry lock? like delete it off Repl? I am not even to sure what it is used for(?) I just got it not to long ago and I am not to sure from where.

The lock file is used for poetry to save what versions of packages you have installed. You can freely remove it, but it will just come back on the next package refresh/install/update/etc.


To stop the poetry lock --no-update command that may happen at the start of a run, do this:
Click three dots and Show hidden files, then open .replit file.
Insert this at the top:

disableInstallBeforeRun = true

You can ignore the poetry.lock file, it doesn’t affect whether the command appears or not.

1 Like

Thanks. Do you know if there is a way I can burn that into Repl? So every time I create a new project it just has it automatically?

You’d need to make a template for yourself or smth, you can’t set that as an option on other templates.


You can have a repl that has it, and just fork it to make a new repl.

Or, use this Shell command once when you create a new repl:

sed -i '1i disableInstallBeforeRun = true\n' .replit

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.