My project has an executable called powerscript.exe
, which is a Python interpreter that does and knows some extra things. This is out of my control, I can not change this.
From the command line I can use this as a drop-in replacement for the Python interpreter. In PyCharm I cannot. Adding this thing as a Python interpreter yields the error message:
Select Python Interpreter An invalid Python interpreter name 'powerscript.exe'!
Which I guess is just a sanity-check on the filename that I want to deactivate or work around.
I have read How to resolve "Invalid Python interpreter name 'python.exe'!" error in PyCharm, they have the same error message but in their case it is a false positive, in my case I really do have an invalid name.
Since it's apparent that PyCharm validates only the name of the executable, you can make a copy of the wrapper executable powerscript.exe
and rename the copy to python.exe
as an interpreter for PyCharm.