cztomczak / cefpython

Python bindings for the Chromium Embedded Framework (CEF)
Other
3.09k stars 473 forks source link

PyInstaller example doesn't work with PyInstaller 3.5 on Linux #552

Open vipertecpro opened 4 years ago

vipertecpro commented 4 years ago

What went wrong ? I couldn't be able to figure it out, Is there any path, permission issue or am i missing something to upload in this path /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp/ where all the build files are.

PyInstaller Bootloader 3.x
LOADER: executable is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp/cefapp
LOADER: homepath is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp
LOADER: _MEIPASS2 is NULL
LOADER: archivename is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp/cefapp
LOADER: Extracting binaries
LOADER: Executing self as child
LOADER: set _MEIPASS2 to /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp
LOADER: LD_LIBRARY_PATH=/opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp
PyInstaller Bootloader 3.x
LOADER: executable is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp/cefapp
LOADER: homepath is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp
LOADER: _MEIPASS2 is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp
LOADER: archivename is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp/cefapp
LOADER: Already in the child - running user's code.
LOADER: Python library: /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp/libpython3.5m.so.1.0
LOADER: Loaded functions from Python library.
LOADER: Manipulating environment (sys.path, sys.prefix)
LOADER: Pre-init sys.path is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp/base_library.zip:/opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp
LOADER: sys.prefix is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp
LOADER: Setting runtime options
LOADER: Initializing python
LOADER: Overriding Python's sys.path
LOADER: Post-init sys.path is /opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp/base_library.zip:/opt/lampp/htdocs/cefpython/examples/pyinstaller/dist/cefapp
LOADER: Setting sys.argv
LOADER: setting sys._MEIPASS
LOADER: importing modules from CArchive
LOADER: extracted pyimod00_crypto_key
LOADER: callfunction returned...
LOADER: extracted struct
LOADER: callfunction returned...
LOADER: extracted pyimod01_os_path
LOADER: callfunction returned...
LOADER: extracted pyimod02_archive
LOADER: callfunction returned...
LOADER: extracted pyimod03_importers
LOADER: callfunction returned...
LOADER: Installing PYZ archive with Python modules.
LOADER: PYZ archive: out00-PYZ.pyz
LOADER: Running pyiboot01_bootstrap.py
LOADER: Running wxpython.py
[wxpython.py] CEF Python 66.0
[wxpython.py] Python 3.5.2 64bit
[wxpython.py] wxPython 4.0.7.post2 gtk3 (phoenix) wxWidgets 3.0.5
[0106/140241.428301:ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received.
Trace/breakpoint trap (core dumped)
cztomczak commented 4 years ago

You are missing CEF binary files.

vipertecpro commented 4 years ago

Thank you so much for quick response. Can you please tell from where i can move to the executable folder ? is it somewhere in the repo. folder path ?

cztomczak commented 4 years ago

What are you doing? There is a pyinstaller example available in the examples/ directory.

vipertecpro commented 4 years ago

I'm following this https://github.com/cztomczak/cefpython/blob/master/examples/pyinstaller/README-pyinstaller.md , But it's not working, what am i doing wrong ? I'm Getting this

Error: Pyinstaller hook-cefpython3.py script was not executed or it failed
Error: PyInstaller failed, code=1
41 INFO: PyInstaller: 3.5
42 INFO: Python: 3.7.3
42 INFO: Platform: Linux-5.3.0-26-generic-x86_64-with-debian-buster-sid
44 INFO: UPX is not available.
45 INFO: Removing temporary files and cleaning cache in /home/shiv/.cache/pyinstaller
98 INFO: Extending PYTHONPATH with paths
['/opt/lampp/htdocs/vipertecpro/cefpython/examples']
98 INFO: Will encrypt Python bytecode with key: This-is-a-secret
98 INFO: Adding dependencies on pyi_crypto.py module
98 INFO: checking Analysis
98 INFO: Building Analysis because Analysis-00.toc is non existent
98 INFO: Initializing module dependency graph...
99 INFO: Initializing module graph hooks...
101 INFO: Analyzing base_library.zip ...
3387 INFO: Analyzing hidden import 'Crypto.Cipher._AES'
3649 INFO: running Analysis Analysis-00.toc
3684 INFO: Caching module hooks...
3698 INFO: Analyzing ../wxpython.py
3711 INFO: Loading module hooks...
3711 INFO: Loading module hook "hook-pydoc.py"...
3712 INFO: Loading module hook "hook-xml.py"...
3936 INFO: Loading module hook "hook-encodings.py"...
3991 INFO: Loading module hook "hook-Crypto.py"...
4012 INFO: Looking for ctypes DLLs
4018 INFO: Analyzing run-time hooks ...
4025 INFO: Looking for dynamic libraries
4868 INFO: Looking for eggs
4869 INFO: Using Python library /home/linuxbrew/.linuxbrew/Cellar/python/3.7.3/lib/libpython3.7m.so.1.0
4872 INFO: Warnings written to /opt/lampp/htdocs/vipertecpro/cefpython/examples/pyinstaller/build/pyinstaller/warn-pyinstaller.txt
4904 INFO: Graph cross-reference written to /opt/lampp/htdocs/vipertecpro/cefpython/examples/pyinstaller/build/pyinstaller/xref-pyinstaller.html
Error: Pyinstaller hook-cefpython3.py script was not executed or it failed
Error: PyInstaller failed, code=1
cztomczak commented 4 years ago

README says that it is required to install Pyinstaller 3.2.1 and yours version is different.

vipertecpro commented 4 years ago

Yes I know, it's the latest and updated one, so it doesn't work on the latest version?

cztomczak commented 4 years ago

Looks like it. You could report a bug in PyInstaller tracker.

marcelomanzo commented 4 years ago

Check the specs file, the pyinstaller is not finding the custom hook in my case I created a dir in my app pyinstaller-custom-hooks and had to set the path like this in the spec file: hookspath=['pyinstaller-custom-hooks'],