mehulj94/BrainDamage

Can't build an exe

MS-Jahan opened this issue · 7 comments

I have used pyinstaller, py2exe and auto-py-to-exe to make the script an exe file, but it's not working.

I have even transformed all the scripts located in Breathe and Echoes directory in one script to check whether it works or not. The script works fine with python, but the built exe doesn't work.

Any idea on how to do that?
Thanks in Advance,

Can you please share screenshots and details about the specific error that you are getting?

C:\Users\Motakabbir-PC\Desktop\BrainDamage-master>C:\Python27\Scripts\pyinstalle
r eclipse.py
405 INFO: PyInstaller: 3.4
405 INFO: Python: 2.7.15
405 INFO: Platform: Windows-7-6.1.7601-SP1
405 INFO: wrote C:\Users\Motakabbir-PC\Desktop\BrainDamage-master\eclipse.spec
421 INFO: UPX is not available.
436 INFO: Extending PYTHONPATH with paths
['C:\Users\Motakabbir-PC\Desktop\BrainDamage-master',
'C:\Users\Motakabbir-PC\Desktop\BrainDamage-master']
436 INFO: checking Analysis
436 INFO: Building Analysis because Analysis-00.toc is non existent
436 INFO: Initializing module dependency graph...
467 INFO: Initializing module graph hooks...
842 INFO: running Analysis Analysis-00.toc
982 INFO: Adding Microsoft.VC90.CRT to dependent assemblies of final executable
required by c:\python27\python.exe
1606 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1
fc8b3b9a1e18e3b_9.0.30729.1_none_8550c6b5d18a9128.manifest
1606 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1
fc8b3b9a1e18e3b_9.0.30729.4137_none_f47d3254f657e518.manifest
1621 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1
fc8b3b9a1e18e3b_9.0.30729.4148_none_f47e1bd6f6571810.manifest
1621 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1
fc8b3b9a1e18e3b_9.0.30729.4940_none_f47ed0f6f6564d90.manifest
2214 INFO: Searching for assembly x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30
729.4940_none ...
2214 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.crt_1fc
8b3b9a1e18e3b_9.0.30729.4940_none_50916076bcb9a742.manifest
2214 INFO: Searching for file msvcr90.dll
2214 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_
9.0.30729.4940_none_50916076bcb9a742\msvcr90.dll
2214 INFO: Searching for file msvcp90.dll
2214 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_
9.0.30729.4940_none_50916076bcb9a742\msvcp90.dll
2230 INFO: Searching for file msvcm90.dll
2230 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_
9.0.30729.4940_none_50916076bcb9a742\msvcm90.dll
2823 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1
fc8b3b9a1e18e3b_9.0.30729.1_none_8550c6b5d18a9128.manifest
2823 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1
fc8b3b9a1e18e3b_9.0.30729.4137_none_f47d3254f657e518.manifest
2823 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1
fc8b3b9a1e18e3b_9.0.30729.4148_none_f47e1bd6f6571810.manifest
2823 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.crt_1
fc8b3b9a1e18e3b_9.0.30729.4940_none_f47ed0f6f6564d90.manifest
2838 INFO: Adding redirect Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0,
30729, 4940)
3400 INFO: Caching module hooks...
3447 INFO: Analyzing C:\Users\Motakabbir-PC\Desktop\BrainDamage-master\eclipse.p
y
12401 INFO: Processing pre-find module path hook distutils
20215 INFO: Processing pre-safe import module hook urllib3.packages.six.moves
23238 INFO: Processing pre-safe import module hook _xmlplus
61605 INFO: Processing pre-safe import module hook setuptools.extern.six.moves

65993 INFO: Processing pre-find module path hook site
65996 INFO: site: retargeting to fake-dir 'c:\python27\lib\site-packages\PyI
nstaller\fake-modules'
101113 INFO: Loading module hooks...
101115 INFO: Loading module hook "hook-distutils.py"...
101119 INFO: Loading module hook "hook-sysconfig.py"...
101123 INFO: Loading module hook "hook-xml.py"...
101750 INFO: Loading module hook "hook-PIL.py"...
101758 INFO: Excluding import 'FixTk'
101769 INFO: Excluding import 'Tkinter'
101780 INFO: Excluding import 'PyQt5'
101791 INFO: Removing import of PyQt5 from module PIL.ImageQt
101792 INFO: Excluding import 'PySide'
101803 INFO: Removing import of PySide from module PIL.ImageQt
101803 INFO: Excluding import 'PyQt4'
101814 INFO: Removing import of PyQt4 from module PIL.ImageQt
101815 INFO: Loading module hook "hook-pycparser.py"...
103506 INFO: Loading module hook "hook-httplib.py"...
103511 INFO: Loading module hook "hook-pydoc.py"...
103520 INFO: Excluding import 'Tkinter'
103529 INFO: Removing import of Tkinter from module pydoc
103530 INFO: Loading module hook "hook-encodings.py"...
107153 INFO: Loading module hook "hook-_tkinter.py"...
107778 INFO: checking Tree
107779 INFO: Building Tree because Tree-00.toc is non existent
107779 INFO: Building Tree Tree-00.toc
108919 INFO: checking Tree
108921 INFO: Building Tree because Tree-01.toc is non existent
108921 INFO: Building Tree Tree-01.toc
109103 INFO: Loading module hook "hook-PIL.Image.py"...
111996 INFO: Loading module hook "hook-Crypto.py"...
Traceback (most recent call last):
File "", line 2, in
ImportError: No module named Math
112217 INFO: Loading module hook "hook-pkg_resources.py"...
114196 INFO: Processing pre-safe import module hook win32com
116452 INFO: Loading module hook "hook-numpy.py"...
116460 INFO: Loading module hook "hook-pywintypes.py"...
118465 INFO: Loading module hook "hook-setuptools.py"...
122657 INFO: Loading module hook "hook-PIL.SpiderImagePlugin.py"...
122667 INFO: Excluding import 'FixTk'
122676 INFO: Excluding import 'Tkinter'
122684 INFO: Loading module hook "hook-xml.etree.cElementTree.py"...
122689 INFO: Loading module hook "hook-numpy.core.py"...
123046 INFO: Loading module hook "hook-sqlite3.py"...
123468 INFO: Loading module hook "hook-win32com.py"...
127288 INFO: Loading module hook "hook-pythoncom.py"...
131078 INFO: checking Tree
131080 INFO: Building Tree because Tree-02.toc is non existent
131082 INFO: Building Tree Tree-02.toc
131110 INFO: Looking for ctypes DLLs
131799 INFO: Analyzing run-time hooks ...
131842 INFO: Including run-time hook 'pyi_rth__tkinter.py'
131852 INFO: Including run-time hook 'pyi_rth_pkgres.py'
131866 INFO: Including run-time hook 'pyi_rth_win32comgenpy.py'
131876 INFO: Including run-time hook 'pyi_rth_multiprocessing.py'
131985 INFO: Looking for dynamic libraries
133507 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc
_1fc8b3b9a1e18e3b_9.0.30729.1_none_7dd1e0ebd6590e0b.manifest
133513 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc
_1fc8b3b9a1e18e3b_9.0.30729.4148_none_ecff360cfb2594f3.manifest
134109 INFO: Searching for assembly x86_Microsoft.VC90.MFC_1fc8b3b9a1e18e3b_9.0.
30729.4148_none ...
134111 INFO: Found manifest C:\Windows\WinSxS\Manifests\x86_microsoft.vc90.mfc_1
fc8b3b9a1e18e3b_9.0.30729.4148_none_4bf5400abf9d60b7.manifest
134119 INFO: Searching for file mfc90.dll
134120 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3
b_9.0.30729.4148_none_4bf5400abf9d60b7\mfc90.dll
134121 INFO: Searching for file mfc90u.dll
134122 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3
b_9.0.30729.4148_none_4bf5400abf9d60b7\mfc90u.dll
134123 INFO: Searching for file mfcm90.dll
134125 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3
b_9.0.30729.4148_none_4bf5400abf9d60b7\mfcm90.dll
134126 INFO: Searching for file mfcm90u.dll
134127 INFO: Found file C:\Windows\WinSxS\x86_microsoft.vc90.mfc_1fc8b3b9a1e18e3
b_9.0.30729.4148_none_4bf5400abf9d60b7\mfcm90u.dll
134707 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc
_1fc8b3b9a1e18e3b_9.0.30729.1_none_7dd1e0ebd6590e0b.manifest
134713 INFO: Found C:\Windows\WinSxS\Manifests\x86_policy.9.0.microsoft.vc90.mfc
_1fc8b3b9a1e18e3b_9.0.30729.4148_none_ecff360cfb2594f3.manifest
134717 INFO: Adding redirect Microsoft.VC90.MFC version (9, 0, 21022, 8) -> (9,
0, 30729, 4148)
205656 INFO: Looking for eggs
205657 INFO: Using Python library C:\Windows\system32\python27.dll
205659 INFO: Found binding redirects:
[BindingRedirect(name=u'Microsoft.VC90.CRT', language=None, arch=u'x86', oldVers
ion=(9, 0, 21022, 8), newVersion=(9, 0, 30729, 4940), publicKeyToken=u'1fc8b3b9a
1e18e3b'), BindingRedirect(name=u'Microsoft.VC90.MFC', language=None, arch=u'x86
', oldVersion=(9, 0, 21022, 8), newVersion=(9, 0, 30729, 4148), publicKeyToken=u
'1fc8b3b9a1e18e3b')]
205723 INFO: Warnings written to C:\Users\Motakabbir-PC\Desktop\BrainDamage-mast
er\build\eclipse\warn-eclipse.txt
206788 INFO: Graph cross-reference written to C:\Users\Motakabbir-PC\Desktop\Bra
inDamage-master\build\eclipse\xref-eclipse.html
210023 INFO: checking PYZ
210023 INFO: Building PYZ because PYZ-00.toc is non existent
210024 INFO: Building PYZ (ZlibArchive) C:\Users\Motakabbir-PC\Desktop\BrainDama
ge-master\build\eclipse\PYZ-00.pyz
225760 INFO: Building PYZ (ZlibArchive) C:\Users\Motakabbir-PC\Desktop\BrainDama
ge-master\build\eclipse\PYZ-00.pyz completed successfully.
226835 INFO: checking PKG
226837 INFO: Building PKG because PKG-00.toc is non existent
226837 INFO: Building PKG (CArchive) PKG-00.pkg
227025 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
227046 INFO: Bootloader c:\python27\lib\site-packages\PyInstaller\bootloader\Win
dows-32bit\run.exe
227046 INFO: checking EXE
227047 INFO: Building EXE because EXE-00.toc is non existent
227048 INFO: Building EXE from EXE-00.toc
227049 INFO: Appending archive to EXE C:\Users\Motakabbir-PC\Desktop\BrainDamage
-master\build\eclipse\eclipse.exe
227075 INFO: Building EXE from EXE-00.toc completed successfully.
227115 INFO: checking COLLECT
227116 INFO: Building COLLECT because COLLECT-00.toc is non existent
227119 INFO: Building COLLECT COLLECT-00.toc
227178 INFO: Redirecting Microsoft.VC90.CRT version (9, 0, 21022, 8) -> (9, 0, 3
0729, 4940)
242382 INFO: Building COLLECT COLLECT-00.toc completed successfully.

C:\Users\Motakabbir-PC\Desktop\BrainDamage-master>

Seems it is not mistake in your code. But I have no idea to deal with it.

It seems you are also missing Math library.

111996 INFO: Loading module hook "hook-Crypto.py"...
Traceback (most recent call last):
File "", line 2, in
ImportError: No module named Math

Can you please give me the exact steps that lead to this particular issue?
Also did you try to run python code(eclipse.py) before running pyinstaller?

transformed all the scripts located in Breathe and Echoes directory in one script to check

did you try running the code without this transformation?

[Edited]
I just followed the steps written in the Readme.md file. Yeah, I ran eclipse.py before running pyinstaller. eclipse.py ran successfully without any issue.

And also, I firstly ran your code (which ran successfully but no exe built) and then I transformed the code in one file (which also ran successfully but no exe was built).

Actually, at first I was using python 3.7 2.7 (the latest one) which I found was not stable. Also I tried to install most of the modules from pip or other sources than you mentioned in the Readme.md file. But finally I installed an previous release of python 3.7 2.7 (thinking that the version is stable enough) and installed mentioned modules (from mentioned sources) & then I was able to build exe.

I just forgot to inform, sorry for that. But there is a new issue. Avast is defining the built exe as a malware.

Is there anyway to bypass AV?

Okay, the code was developed in Python 2.7 and will be stable for that version of Python only.
I cannot help you with bypassing the av.
I will be closing the issue. Please let me know if you still face issue after using Python 2.7 and without transforming the code.

Sorry, my bad. Check the edited reply :-)