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

It will be like so:

python venv path

After that, restart VSCode, open any python file, and set your python environment to the one created with ADR:

python venv setting

Clone this wiki locally