Skip to content

Use Poetry with Visual Studio Code

Rafael Araujo Lehmkuhl edited this page Aug 12, 2020 · 3 revisions

If you use Visual Studio Code, you need to tell it where are the virtualenvs created by Poetry. To do that:

  1. Open your terminal and type "poetry config --list"
  2. Copy the path on the end of the "virtualenvs.path" variable (it will be something like "C:\Users\Rafael\AppData\Local\pypoetry\Cache\virtualenvs")
  3. Open your VSCode settings (gear icon on the bottom-left corner, settings option)
  4. On the search box type "python venv path"
  5. Set the "Python Venv Path" to the path you copied on step 2, like so:

python venv path

  1. Restart VSCode, open any python file, and set your python environment to the one created with ADR, like so:

python venv setting

  1. Restart VSCode again and run any script that uses ADR. If you are prompted to trust the source of the library, select "A" for "Always run"
Clone this wiki locally