Install the Poetry build tool & package manager by following these instructions.
If you're working on this project, you should know how to do this.
Poetry works a bit differently than venv
and pip
. Since the project is already configured, all you need to do is navigate to the root of the repository and do
poetry init
and at this point you're ready to use the virtual environment.
Rather than sourcing an activate
script in a venv
directory, you prefix your commands with poetry run
and it will automatically run them in the virtual environment poetry made and manages for you.
For example, instead of
source venv/bin/activate
python3 main.py
you would just do
poetry run python3 main.py
To add a new package to the repository, simply run
poetry add <package-name>