Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python script to exe on python 3.5

Tags:

python

exe

What can I use to go from a python script to an exe on 3.5? Because both py2exe and CxFreeze only support up to 3.4.

Also, would it be possible to create an executable without a bunch of .dll's generated? Because I would like to have just a single .exe to share.

Thank you

like image 202
Prof Avatar asked Oct 19 '15 20:10

Prof


People also ask

Can you convert Python script to Exe?

In order to more easily run Python scripts on Windows machines, you can convert Python to .exe files using either cx_freeze or PyInstaller.


1 Answers

Try pyinstaller. It worked for me fine with python 3.5.

Install pyinstaller with the following command

pip install pyinstaller

and build you exe with pyinstaller --onefile your_pyfile.py. --onefile option generates one file of about 6-8 megs max.

like image 63
LetzerWille Avatar answered Sep 18 '22 18:09

LetzerWille