can't run .exe file - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: can't run .exe file (/thread-2092.html) |
can't run .exe file - Doug - Feb-18-2017 Hey! I have compiled my python file with pyinstaller and produced a .exe file, however my program doesn't want to run. I ran it through the shell and it printed out the following error message: Does anyone know what could I possibly do to fix it? Many thanks!
RE: can't run .exe file - Larz60+ - Feb-18-2017 I have had very good luck with py2exe. Suggest that you give that a try, basic instructions are here: https://pypi.python.org/pypi/py2exe/0.9.2.2 I have had difficulty with some packages using other methods. There are always solutions, but sometimes not so evident. py2exe seems to work most (if not all) the time. One other thing that really seems to help is to create your application in a virtual environment. If you need more detailed information on py2exe, see:
RE: can't run .exe file - snippsat - Feb-18-2017 The problem Larz60+ is that py2exe is not updated for Python 3.5 that he use. Pyinstaller, Cx_freeze, pynsist 1.9 work for 3.5. There is a bug rapport this. You can look at these post1 post2. Here i show usage of Pyinstaller and Cx_freeze and i like to use virtual environment when using these program. Then there is less stuff that can go wrong. RE: can't run .exe file - Larz60+ - Feb-18-2017 Quote:The problem Larz60+ is that py2exe is not updated for Python 3.5 that he use. I have used the python 3 version: https://pypi.python.org/pypi/py2exe/0.9.2.2 with good results. RE: can't run .exe file - snippsat - Feb-19-2017 (Feb-18-2017, 10:07 PM)Larz60+ Wrote: I have used the python 3 version: https://pypi.python.org/pypi/py2exe/0.9.2.2It work up to 3.4,not for 3.5. RE: can't run .exe file - wavic - Feb-19-2017 I have a question but don't want to open a new topic. Can I create .exe file on Linux box? RE: can't run .exe file - snippsat - Feb-19-2017 (Feb-19-2017, 07:19 AM)wavic Wrote: I have a question but don't want to open a new topic. Can I create .exe file on Linux box?No to make a "exe" you need Windows. Pyinstaller work in Linux it create a executable that work for linux. Quote:PyInstaller is tested against Windows, Mac OS X, and Linux. However, it is not a cross-compiler: RE: can't run .exe file - Larz60+ - Feb-19-2017 I will go back to pyinstaller. Does it work with 3.6 also? RE: can't run .exe file - snippsat - Feb-19-2017 (Feb-19-2017, 12:14 PM)Larz60+ Wrote: Does it work with 3.6 also?Not yet Add support for Python 3.6 #2331 Cx_freeze work for 3.6,i did a test here. |