Testet with 3.5 and 3.6 and it work.
I use wheel from gohlke.
The default path is horrible,i would reinstall and choose a path like
Make sure that
Restart pc.
Files:
Here is the whole process(shell is cmder).
py2exe work up to 3.4.
I use wheel from gohlke.
The default path is horrible,i would reinstall and choose a path like
C:\python35
Make sure that
add python 3.5 to PATH
and pip
is marked on.Restart pc.
Files:
#hello_cx.py from datetime import datetime print('Hello from cx_Freeze') print('The current date is {}'. format(datetime.today().strftime('%B %d, %Y %H:%M:%S')))
#make_exe.py from cx_Freeze import setup,Executable import sys # Replaces commandline arg 'build' #sys.argv.append("build") # If need to include/exclude module/packages includes = [] excludes = [] packages = [] # Console or Win32GUI base = None if sys.platform == "win32": base = 'Console' #base = 'Win32GUI' # Name of file to make ".exe" of filename = "hello_cx.py" setup( name = 'Myapp', version = '0.1', description = 'Cx test', options = {'build_exe': {'excludes':excludes,'packages':packages,'includes':includes}}, executables = [Executable(filename, base=base, icon = None)]) # From command line #python make_exe.py buildI do run it from virtual environment(it's now build in 3.5).
Here is the whole process(shell is cmder).
# make virtual environment C:\Python35 λ python -m venv cx_test C:\Python35 λ cd cx_test/scripts C:\Python35\cx_test\Scripts λ C:\Python35\cx_test\Scripts\activate.bat (cx_test) C:\Python35\cx_test\Scripts λ pip install cx_Freeze-5.0-cp35-cp35m-win32.whl Processing c:\python35\cx_test\scripts\cx_freeze-5.0-cp35-cp35m-win32.whl Installing collected packages: cx-Freeze Successfully installed cx-Freeze-5.0 (cx_test) C:\Python35\cx_test\Scripts λ python make_exe.py build # A lot of files (cx_test) C:\Python35\cx_test\Scripts λ cd build\exe.win32-3.5 # Test exe (cx_test) C:\Python35\cx_test\Scripts\build\exe.win32-3.5 λ hello_cx.exe Hello from cx_Freeze The current date is January 03, 2017 00:44:34
Quote:I have previously had no luck with py2exe or pyinstaller, which evidently work only with python 2.pyinstaller was the first one that worked for 3.5.
py2exe work up to 3.4.