Hi! I’m trying to set up Doom Emacs as a Python IDE and I’m struggling to make it work with Poetry virtual envs. Pylint says it’s unable to import my dependencies (e.g.
import pandas is marked as an error), and I don’t get autocomplete for them.
So I have
python (+lsp +poetry +pyenv) in my
init.el (this is the stack I need), and these seem to be installed and running. I managed to install and configure (more or less) pylint and flake8. Poetry plugin is available,
M-x poetry-show does list my dependencies correctly, and
M-x poetry-venv-toggle does display my env name in the modeline. But pylint still doesn’t see the packages I’m importing.
I also tried enabling
poetry-tracking-mode, but this seems to freeze Emacs entirely (“Poetry finished” is blinking in the modeline, and I have to kill Emacs because it stops responding).
I’m not particularly attached to lsp/pylint, if that makes any difference, I just want some linting and autocompletion that will work with Poetry.
I’m rather new to Emacs and I’m a bit lost with all these modes and plugins.
I want my Emacs to detect/lint/autocomplete my imports correctly based on the Poetry virtual environment.
Loading data dump...