wilfredinni/comments_merken

Python projects with Poetry and VSCode. Part 2 - Python Cheatsheet

Opened this issue ยท 6 comments

Python projects with Poetry and VSCode. Part 2 - Python Cheatsheet

In this second part, we'll add our virtual Environment to VSCode, update our dependencies and integrate Flake8, Black and Pytest with the editor.

https://www.pythoncheatsheet.org/blog/python-projects-with-poetry-and-vscode-part-2

Just wanted to thank you for an excellent post! It was exactly what I needed to migrate from pip/setup/twine to poetry, which is much nicer to work with. Keep it up!

Yes, very useful tutorial, thanks for posting it. For vscode to find my virtual environment created by poetry I had to add the following to settings.json:

"python.venvPath": "~/.cache/pypoetry/virtualenvs",

For vscode to find my virtual environment created by poetry I had to add the following to settings.json

or alternatively in workspace settings.json:

{
    "python.pythonPath": "~/.cache/pypoetry/virtualenvs/pypi-poetry-tutorial-3a4qo9FM-py3.8/bin/python3.8"
}

amazing article! Thanks for putting this together

rbndm commented

@testautomation I saw this on the issue opened on VsCode GitHub to support Poetry virtualenvs

microsoft/vscode-python#8372 (comment)

"... FYI we are going to be removing the use of python.pythonPath in a future release (#11015), so if you're going to automate a setting then it should probably be python.venvPath."