my main py file is working correctly, but when i froze this with cx_freeze and i try to open, it occurs an error and can not open. it says:
and this is my setup.py :
import os
from cx_Freeze import setup, Executable
build_exe_options = {"packages":["lxml","gzip","requests"]}
setup( name = "name",
version = "0.1",
description = "description",
options = {"build_exe": build_exe_options},
executables = [Executable("file.py", icon=os.path.join("icon_64x64.ico"), base="Win32GUI")])
..
This worked for me python 3.6:
build_exe_options = {"packages": ["os", "numpy"], "includes": ["numpy"]}
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup(name="Hello World",
version="0.1",
description="My GUI application!",
options={"build_exe": build_exe_options},
executables=[Executable("main.py", base=base)])
This will work :
find "_methods" in site-packages/numpy/core/ (Specific location in my case: C:\ProgramFile\Anaconda3\Lib\site-packages\numpy\core) and copy it to build/exe.win32-2.7/lib/numpy/core/
Run now, it will works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With