im use window 10 x64
and
[hello_world.py] CEF Python 66.0
[hello_world.py] Chromium 66.0.3359.181
[hello_world.py] CEF 3.3359.1774.gd49d25f
[hello_world.py] Python 3.7.1 32bit
this my .spec file(i thot not related with it)
block_cipher = None
a = Analysis(['__main__.py'],
pathex=["C:\\Program Files (x86)\\Windows Kits\\10\\Redist\\10.0.17763.0\\ucrt\\DLLs\\x86"],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='__main__',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
runtime_tmpdir=None,
console=False )
this my __main__.py file
# Hello world example. Doesn't depend on any third party GUI framework. # Tested with CEF Python v57.0+. import json
from cefpython3 import cefpython as cef import platform import sys
def main(): check_versions() sys.excepthook = cef.ExceptHook # To shutdown all CEF processes on error cef.Initialize() cef.CreateBrowserSync(url="https://www.google.com/", window_title="Hello World!") cef.MessageLoop() cef.Shutdown()
def check_versions(): ver = cef.GetVersion() print("[hello_world.py] CEF Python {ver}".format(ver=ver["version"])) print("[hello_world.py] Chromium {ver}".format(ver=ver["chrome_version"])) print("[hello_world.py] CEF {ver}".format(ver=ver["cef_version"])) print("[hello_world.py] Python {ver} {arch}".format( ver=platform.python_version(), arch=platform.architecture()[0])) assert cef.__version__ >= "57.0", "CEF Python v57.0+ required to run this"
if __name__ == '__main__': main()
i get this when i open pyinstaller builded exe file[1219/004030.604:ERROR:icu_util.cc(133)] Invalid file descriptor to ICU data received.
I tried: https://github.com/cztomczak/cefpython/blob/master/examples/pyinstaller/README-pyinstaller.mdstep by step , but still get this error
and also , i spend whole day use google search , but still not find solution(actually find out some solution, but that work for Linux or Mac)
i tried lower version Python 3.6.7 but still get this error
i dont know this error is about my computer or dev environment?
I got the same issue. I solved it by copying "icudtl.dat、locales、cef.pak、cef_100_percent.pak……" into the .exe directory.
we can use 'pip show cefpython3' to find out where the files are. For example, my cefpython3 path is "c:\users\baight\appdata\local\programs\python\python38\lib\site-packages". So we can find the files in "c:\users\baight\appdata\local\programs\python\python38\lib\site-packages\cefpython3".
I am not sure which files should copy, so I copied all of them, except "_pycache__"、"examples"、"swiftshader"、"__init__.py"、"debug.log"、"License"、"README.txt"……, that obviously not need.