如何解决“C:\msys64\mingw64\bin\python.exe: 无法打开文件”错误?

How to solve " C:\msys64\mingw64\bin\python.exe: can't open file " error?

当我想在终端中 运行 我的 python 脚本时出现错误...

C:\msys64\mingw64\bin\python.exe: can't open file

可能的问题原因:

我已经在我的机器上安装了 MSYS2 这样我就可以为 C/C++ 程序使用 g++gcc 编译器并且使用 g++gcc 我需要添加 C:\msys64\mingw64\bin 路径到系统环境变量。

C:\msys64\mingw64\bin文件夹里面有python.exe;所以我猜测它会导致我的 python 解释器和 C:\msys64\mingw64\bin 的 python.exe

之间发生某种冲突

当我从系统环境变量中删除 C:\msys64\mingw64\bin 路径时,我得到了预期的输出。

我想要什么?

我想要一个可以同时使用 python 和 g++/gcc 的解决方案。

我在 System/User 的环境变量中重新排序了路径,现在我得到了我需要的东西。