我希望将.py文件转换为可执行文件,并在raspberry pi上运行。我安装了pyinstaller
sudo apt-get install pyinstaller
sudo pyinstaller test.py此命令创建一个test.spec文件和dist文件夹。
cd dist/test在那里我有一个可执行文件名为test。现在我想运行它
sudo ./test
error: ./test: 1: ./test: Syntax error: "(" unexpected我安装了mono
sudo apt-get install mono-complete
sudo mono test.exe错误:
no such file on the directory然后我用
sudo mono test错误显示:
cannot open assembly'test':file does not contain a valid CIL image我怎么能解决我的问题。我希望将我的代码(以空闲方式编写的.py)转换为一个可执行文件,并在raspberry pi上运行它。
发布于 2016-02-16 11:39:36
将Linux-32位重命名为Linux-32位arm仍然会生成x86文件。您需要编译自己的Linux-32位arm引导程序。
在您的PyInstaller分发目录中运行:
cd bootloader
sudo python ./waf configure --no-lsb all然后将整个./PyInstaller/ bootloader /linux-32位arm复制到目录,您在哪里重命名了该引导加载程序?
在那之后,一切都会好的。
https://stackoverflow.com/questions/35430043
复制相似问题