How to use the current system interpreter in PyCharm?

PyCharm provides the ability to specify interpreters (by default for new projects, individually for projects, as well as for individual startup scripts and their templates). But if I specify the default system interpreter - for example. in /usr/bin/python or, for the Homebrew system, in /usr/local/bin/python - the "interpreter paths" listed in PyCharm lists (in settings> Project Interpreter) are incorrect : they include not only paths for selected interpreter, but also for earlier versions.

For example, after upgrading from the OLD version to the NEW Homebrew interpreter, there is not only a full set of paths /usr/local/Cellar/python/NEW/... , as expected, but also a full set of paths /usr/local/Cellar/python/OLD/... listed. The only way I found to fix this is to remove the offensive interpreter from the entire PyCharm settings - wherever it is used, and add it back.

Is there a less error-prone way to tell PyCharm to simply use the current Python system interpreter: one that will work on the command line with python and which python reported?

+6
source share

All Articles