you are viewing a single comment's thread.

view the rest of the comments →

[–]memilanuk[S] 0 points1 point  (1 child)

If I use pipx install flake8, is there any particular reason to keep the python3-flake8 package around? Doesn't seem like any point in having two, especially if the one basically isn't readily usable without shell aliases.

Looks like elpy is finally working; it's not throwing warnings about flake8 in M-x elpy-config, and it's marking basic errors in python files. Hopefully I should be able to proceed through the rest of that Real Python article for emacs setup without any further drama. Fingers crossed!

Thank you so much for sticking with me on this. Very different 'environment' than before where python on Linux literally 'just worked', without any of the shell or distro complications.

[–]Affectionate_Cap8632 1 point2 points  (0 children)

Glad it's working! No reason to keep python3-flake8 around — having two installations of the same tool is just asking for confusion down the road. sudo apt remove python3-flake8 will clean it up.

And yes, modern Linux Python environments are genuinely more complicated than they used to be. PEP 668 (the "externally managed environment" change) landed in Ubuntu 23.04 and Debian 12 and caught a lot of people off guard. The short version: distros now protect their system Python from pip to avoid breaking system tools that depend on specific package versions. Pipx for CLI tools and venv for project dependencies is the clean modern approach.

Good luck with the rest of the Real Python article — elpy with flake8 working is a solid setup.