DEV Community

Discussion on: Beginner Guide on “Poetry”, New Python dependency management tool

Collapse
 
jweberdj profile image
Joshua Weber

Poetry is great! Does anyone know how to run a python script with poetry and use a python option?

Ideally, need to invoke a python script as so: python3 -u script.py

Collapse
 
forfdev profile image
Andrew Spittlemeister

You can use poetry run <your commands here> to run anything within the virtual environment described by the pyproject.toml file. So poetry run python3 -u script.py.