Pyinstaller创建非工作文件

时间:2017-12-07 11:41:59

标签: python windows pyinstaller

我在Windows XP上安装了python 2.7.14并且运行良好。

然后我使用以下命令安装pyinstaller:

pip install pyinstaller

安装了pyinstaller版本3.3

然后我用一个只包含的简单文件尝试了它:

print("Hello World.")

我使用了以下命令:

pyinstaller -F hello.py

它创建了一个build和dist文件夹,在dist文件夹中创建了一个名为hello.exe的文件。但是,在尝试运行它时,我在对话框中收到以下错误消息:

C:\myfolder\hello.exe is not a valid win32 application

关闭对话框后,终端上会显示以下内容:

Access is denied.

为什么pyinstaller会创建非工作可执行文件?问题出在哪里?如何解决?谢谢你的帮助。

1 个答案:

答案 0 :(得分:0)

因为某些更新破坏了Windows XP兼容性。

通过:
https://github.com/pyinstaller/pyinstaller/issues/2876
https://github.com/pyinstaller/pyinstaller/pull/2974

您仍然可以使用版本3.2.1。

// require('./file2'); // require('./file2'); test('create', () => { let person = createPerson('Tester', 40); expect(person.getName()).toBe('Tester (40)'); });