The exe file created by pyinstaller does not have an extension and does not start.

Asked 2 years ago, Updated 2 years ago, 34 views

In Python 3.6 environments, you are trying to exe a simple script that displays hello.

When you run pyinstaller test.py --onefile, the following display appears, and the dist folder prints a test file that does not have .exe.
How do I print an executable exe file?

root@a:~/notebooks/EXE#pyinstaller test.py --onefile
111 INFO: PyInstaller: 3.4
111 INFO: Python: 3.6.4
113 INFO: Platform: Linux-4.15.0-29-generic-x86_64-with-debian-stretch-sid
114 INFO: wrotte/root/notebooks/EXE/test.spec
116 INFO—UPX is not available.
117 INFO—Extending PYTHONPATH with paths
['/root/notebooks/EXE', '/root/notebooks/EXE']
117 INFO:checking analysis
117 INFO—Building Analysis because Analysis-00.toc is non existent
117 INFO: Initializing module dependency graph...
124 INFO: Initializing module graph hooks...
126 INFO: Analyzing base_library.zip...
6527 INFO:running analysis -00.toc
6641 INFO: Caching module hooks...
6645INFO: Analyzing/root/notebooks/EXE/test.py
6649 INFO: Loading module hooks...
6649 INFO: Loading module hook "hook-encodings.py" ...
6833 INFO: Loading module hook "hook-pydoc.py" ...
6834 INFO: Loading module hook "hook-xml.py" ...
7335 INFO: Looking for ctypes DLLs
7335 INFO: Analyzing run-time hooks...
7340 INFO: Looking for dynamic libraries
9923 INFO: Looking for eggs
9923 INFO: Python library not in binary dependencies. Doing additional searching...
14143 INFO: Using Python library/usr/lib/x86_64-linux-gnu/libpython3.6m.so.1.0
14148INFO: Warnings write to /root/notebooks/EXE/build/test/warn-test.txt
14166 INFO: Graph cross-reference write to /root/notebooks/EXE/build/test/xref-test.html
14180 INFO: checking PYZ
14180 INFO: Building PYZ because PYZ-00.toc is non existent
14180 INFO: Building PYZ(ZlibArchive)/root/notebooks/EXE/build/test/PYZ-00.pyz
14441 INFO: Building PYZ(ZlibArchive)/root/notebooks/EXE/build/test/PYZ-00.pyz completed successfully.
14444 INFO:checking PKG
14444 INFO—Building PKG cause PKG-00.toc is non existent
14444 INFO: Building PKG (Carchive) PKG-00.pkg
17288 INFO: Building PKG (Carchive) PKG-00.pkg completed successfully.
17292 INFO: Bootloader/root/anaconda3/lib/python3.6/site-packages/PyInstaller/bootloader/Linux-64bit/run
17292 INFO—Checking EXE
17292INFO—Building EXE cause EXE-00.toc is non existent
17292 INFO—Building EXE from EXE-00.toc
17295 INFO—Appending archive to ELF section in EXE/root/notebooks/EXE/dist/test
17327INFO: Building EXE from EXE-00.toc completed successfully.

python python3

2022-09-30 10:54

1 Answers

113INFO:Platform:Linux-4.15.0-29-generic-x86_64-with-debian-stretch-sid

WSL/VirtualMachine/Original Linux running in a non-Windows environment anyway.
The PyInstaller is listed at the beginning of the FAQ that cross-platform development is not possible, so it must be run in some kind of Windows environment.

Frequently asked questions.pyinstaller/pyinstaller
Google Translation

Can I use PyInstaller as a cross compiler?

i. Can I package Windows binaries while running on Linux?
No, this is not supported.Please use Wine for this.PyInstaller works well on Wine.You may want to see this thread on your mailing list.Version 1.4 incorporated several features that supported this, but only half the functionality.You will need a Windows system in a different partition and will only work with pure Python programs. As soon as you want a decent GUI (gtk, qt, wx), you will need to install your Windows library anyway.So using Wine is much easier.

ii. Can I package Windows binaries while running OS X?
No, this is not supported.Try this on Wine.

iii. Can I package OS X binaries while running on Linux?
This is completely impossible at the moment.I'm sorry! If you want to help me, I welcome you.


2022-09-30 10:54

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.