'How to launch exe from PyCharm Terminal?

I'm trying to launch Blender directly from PyCharm Terminal on Windows. I first use cd 'C:\Program Files\Blender Foundation\Blender 3.1\' to get into the directory containing the executable I need, and this works okay. Then I call blender.exe and expect it to launch Blender executable from the directory I am currently in. But for some reason it launches the older (2.93) version from another folder. The same steps work just right when I do all the same in the Windows cmd.exe. I've thought that the problem could be with the Python interpreter, but I use Python interpreter that goes with Blender 3.1 in the PyCharm project settings. What am I doing wrong and how can I run the exact executable I need?

P.S. I know that I can write a simple script in Python, use subprocess module, and get almost the same result, but anyway I'd like to use the launch from the Terminal if it is possible.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source