Skip to content

Instantly share code, notes, and snippets.

@MizterB
Last active September 22, 2021 18:19
Show Gist options
  • Save MizterB/8e4811c78dd06c44fbc703e1daf5e433 to your computer and use it in GitHub Desktop.
Save MizterB/8e4811c78dd06c44fbc703e1daf5e433 to your computer and use it in GitHub Desktop.
Using Poetry

Guide to getting set up

Start debugging

To get debugging within the Poetry module working correctly, create a custom launch config

The key is to add:

"env": {"PYTHONPATH": "${cwd}"

Full example:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "env": {"PYTHONPATH": "${cwd}"
        }
    ]
}

Install / update packages in a virtualenv

poetry install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment