Easier way to select an interpreter
Is there some easier way to add/select interpreters in PyCharm? I know I can do it manually, [Add new interpreter] > … > VirtualEnv > Existing > Dig through the filesystem to find it… It's so slow and I have to do it often.
Is there no straight-forward way of using the Python interpreter from inside the project's virtualenv (usually .venv/bin/python in the root of the project)? I haven't found any option in PyCharm to just default to the project's virtualenv's python executable, even though I presume most Python developers work this way.
Secondly, why aren't the local interpreters, in particular those in virtual environments located _inside_ the project, specific only to that one project? I have a lot of projects I am working on, each of them has at least one virtualenv (some multiple) yet switching between existing interpreters is a pain because I have tens of interpreters in the list, even though most of them are obviously irrelevant if they are virtualenvs inside of other projects.
I am a big fan of PyCharm (and other IntelliJ IDEs) but this interpreter pain is annoying. Maybe there is a solution already?
Thanks!
Please sign in to leave a comment.
Hi Martin,
For selecting existing environments this is indeed the behavior we have now. We have plans to simplify the creation of projects in the 2025.1 version though. Keep an eye out for this improvement.
In regards to the second point, this is a regression: https://youtrack.jetbrains.com/issue/PY-70190/Interpreters-associated-with-different-projects-are-shown-in-interpreter-widget-list
Thanks for the info, Miguel, looking forward to the improvements!
As for the second issue, I have commented on the issue in the tracker, it seems to be still happening in my case even on the newest version (at least on Windows with projects in WSL and WSL-based virtualenv interpreters).
Thanks!