'/usr/bin/python3: 在 Raspberry Pi 上使用单声道执行 .exe 文件时无法打开文件 'test.py''

'/usr/bin/python3: Can't Open File 'test.py'' when executing .exe file using mono on Raspberry Pi

我目前正在尝试在 Visual Studio 中编写一个成功构建的程序,然后当我将解决方案转移到我的 Raspberry Pi 并使用 Mono 执行 "TestPiPlate.exe" 它给了我错误:“/usr/bin/python3:无法打开文件 'test.py':[Errno 2] 没有这样的文件或目录”,然后是我插入的 "done" 语句我的 c# 程序。

这是我正在做的自动化 Raspberry Pi 项目,我正在尝试使用编写的 python 脚本测试继电器板。

这是我目前的 Visual Studio 代码:

        iotlib.PythonScrpt full_test = new PythonScrpt("test.py");
        full_test.Run();
        Console.WriteLine("done");

iotlib.PythonScrpt设置正确,所以我不明白为什么找不到test.py文件,因为它与.exe调试文件在同一目录中。

我希望测试 运行 并通过我的脚本直观地看到继电器打开,但错误甚至阻止我测试脚本。

检查 运行s TestPiPlate.exe 的用户是否有 test.py[=17= 的执行权限] 文件。

此外,要调试它,请尝试 运行 任何 bash 命令以查看是否可以使用 Process.Start()