- Installing Poetry to manage dependencies.
# Install Poetry.
pip3 install poetry==1.7.1
# Verify that Poetry is working.
poetry --version
Warning
If you receive an error: "Command not found.", add Poetry to your user Path variable
.
# For *-nix systems.
export PATH="$HOME/.local/bin:$PATH"
# For Windows.
[System.Environment]::SetEnvironmentVariable('path', $env:USERPROFILE + "\AppData\Roaming\Python\Scripts;" + [System.Environment]::GetEnvironmentVariable('path', "User"),"User")
- All dependencies have already locked in
poetry.lock
, you just need to install it.
- If you need the complete environment with dev-tools.
poetry install
# Install pre-commit hook to .git.
pre-commit install
- If you need minimal production dependencies without dev-tools.
poetry install --without dev
- And now you're ready to run jupyter notebook using env based on poetry venv dependencies.
poetry run jupyter notebook
# OR just activate your created virtual environment like this.
poetry shell