how to build .exe for python 3.5+, 3.6 if possible?
Is there now an easy protocol to build a .exe from python 3.5+, using modules pyqtgraph, qt5, theano, pymc3, numpy, scipy, os and sys, and opening a simple GUI stored in a '.ui' file ? I lost hours and eventually failed to make one (for w7-64 bits). Help !
preliminary failure with py2exe: I first install py2exe for python 3 but it turns out this is not compatible with my python 3.6 yet, so I downgraded to python 3.5… to get a bunch of errors. Then I went to forums and tried the proposed cures but failed (I’m uneasy with windows), the alternative being to downgrade to python 3.4… So I downgraded to python 3.4 to get an error concerning a missing ‘msvcr100.dll’ that I tried to install following instructions on forums but by default I don’t have the permission to modify system directories… When I eventually had this permission it turns out the ‘regsvr32’ command fails (isn’t this for 32 bits ? but there is no ‘regsvr64’…). Following episodes are described below.
update august 23, 2017, 1pm:
I also tried pyinstaller as advised but it failed (see my related question build a .exe for Windows from a python 3 script importing theano with pyinstaller)
I also tried cx_freeze but it failed (see my related question build a .exe for Windows from a python 3 script)
I also tried pynsist but it fails (same link than above)
what's next ?
update september, 2, 2pm:
I eventually managed to build a .exe with pyinstaller after many episodes.
Unfortunately I failed to deal with the ‘theano’ module (that is required in my case by the ‘pymc3’ module) and I had to modify the .py files and give up part of the application. Could anyone help me building a .exe for windows 7+, with the ‘theano’ module ?
see build a .exe for Windows from a python 3 script importing theano with pyinstaller
Pyinstaller Works with Python 3.5 and it is working even for packages like tensor-flow, scipy , etc (The packages I worked with)
py -3.5 pip install pyinstaller
then go the C:\Users\user\AppData\Local\Programs\Python\Python35\Scripts and run the command
pyinstaller <code .py file along with directory> --onefile
--onefile : is for compressing the build and get a single file as output
pyinstaller - how to build .exe for python 3.5+, 3.6 if possible?, Pyinstaller Works with Python 3.5 and it is working even for packages like tensor-flow, scipy , etc (The packages I worked with) py -3.5 pip install pyinstaller. Is there now an easy protocol to build a .exe from python 3.5+, using modules pyqtgraph, qt5, theano, pymc3, numpy, scipy, os and sys, and opening a simple GUI stored in a '.ui' file ? I lost hours and eventually failed to make one (for w7-64 bits).
I would suggest pyinstaller see http://www.pyinstaller.org/
The pyinstaller already supports 3.5
The development version supports 3.6
5. Creating Built Distributions, dev (3.9), 3.8.2, 3.7, 3.6, 3.5, 2.7 A built distribution is how you make life as easy as possible for installers of And creating “smart” built distributions, such as an RPM package or an executable installer for Windows, is far more convenient for users even if your Changed in version 3.5: Added support for the xztar format. py2exe for Python 3. py2exe is a distutils extension that allows to build standalone Windows executable programs (32-bit and 64-bit) from Python scripts. It can build console executables, windows (GUI) executables, windows services, and DLL/EXE COM servers. This repository extends the support of py2exe to Python 3.5-3.6-3.7.
It is better to use spec file to import other hidden libraries. I listed all Sklearn libraries and add them to spec file as a hiddenimports, you can add libraries you used in your project.
albertosottile/py2exe: py2exe for Python 3.5-3.6-3.7, Contribute to albertosottile/py2exe development by creating an account on GitHub. allows to build standalone Windows executable programs (32-bit and 64-bit) from Python build wheels for Python 3.5 and Python 3.6. fix a bug experienced when Install VS2015 or VC++ Build Tools (details available here); Open the Still works for python 3.8 as far as I know UPDATE: the normal branch now supports python 3.6! All you need to do is "pip install pyinstaller". If for any reason you need the dev branch just use
How can I convert a .py to .exe for Python?, Im trying to convert a fairly simple Python program to an executable and couldnt find up until python 3.5 - do I need to download and use this version if attempting this? Install Python 3.6. Within that folder you can find your application. This video demonstrates how to convert .py to .exe so you can run a python script without python on the host computer using pyinstaller. This video will show you how to set up pip, install
PyInstaller Quickstart, If you have problems to get your application running, please have a look at If that PyInstaller works with Python 2.7 and 3.5—3.7, it builds smaller executables Change to the Python-2.3.5 directory and run the "./configure", "make", "make install" commands to compile and install Python. The source archive is also suitable for Windows users who feel the need to build their own version.
PyInstaller · PyPI, Installation. PyInstaller is available on PyPI. Python: 2.7 or 3.5-3.7; PyCrypto 2.4+ (only if using bytecode encryption) This error inhibited building an executable which has non-ASCII characters in the filename. Add module enum to base_library.zip, required for module re in Python 3.6 (and re is required by warnings). In this Python 3 programming tutorial video, we cover the cx freeze module, which is a 3rd party module aimed at converting your Python script to an executable, or .exe. This can be very useful