28

I am trying to compile my python 3.5 file with the latest py2exe version 0.9.2.2 with the following command:

py -3.5 -m py2exe.build_exe myscript.py

But it reports this:

"run-py3.5-win-amd64.exe" file is not found in the ...lib\site-packages\py2exe\ folder.

Does this mean that py2exe 0.9.2.2 is only compatible up to python 3.4?

sideshowbarker
  • 81,827
  • 26
  • 193
  • 197
Avantha De Silva
  • 321
  • 1
  • 3
  • 3
  • Related: The last paragraph of [this answer](http://stackoverflow.com/a/30643849/3718878). Py2exe will probably take a while to become compatible with Python 3.5. – Zenadix Oct 27 '15 at 15:35
  • I "cheated" and simply renamed the file `run-py3.4-win-amd64.exe` to `run-py3.5-win-amd64.exe`. While I still get an error message, I believe that is rather due to me using third party modules than anything else. – Sebastian Hietsch May 17 '16 at 17:27
  • Python 3.6 is out now (Dec 2016). Right now, py2exe doesn't support Python 3.5 or 3.6. – Craig McQueen Mar 15 '17 at 08:56

8 Answers8

17

Unfortunately as of November 2016 there is still no Python 3.5 support in sight for py2exe. However, I've had great success using cx_Freeze 5.0 with Python 3.5 and since both projects use a very similar configuration I've migrated away from py2exe to cx_Freeze without much work. Binary Wheels of cx_Freeze 5.0 for Python 3.5 are now available officially on PyPi: https://pypi.python.org/pypi/cx_Freeze

skrause
  • 989
  • 1
  • 9
  • 14
10

Install pyinstaller through Command Prompt (Microsoft Windows) :

  1. search cmd on windows to open Command Prompt with black screen
  2. type and enter: pip install pyinstaller
  3. Again at Command Prompt type and enter: cd c:\....(the Folder where your file example.py is located)
  4. Finally type and enter: pyinstaller --onefile example.py
  5. Now after some minutes your example.exe is ready
Mohsen Haddadi
  • 1,296
  • 2
  • 16
  • 20
7

There are significant changes in Python 3.5 regarding the MSVCR dll dependency. py2exe 0.9.2.2 supports Python 3.3 and 3.4 Article describing these changes - BUILDING EXTENSIONS FOR PYTHON 3.5

Renoslav
  • 71
  • 2
3

I came here looking for a 3.5 exe generator. I've found that using "pyinstaller" version 3.2 works perfectly with python 35. I found the easiest way to use it is from the command window when on Windows. To make things a little easier you can create a command window from the directory your scripts are stored. Here's how: From the directory your scripts are saved you can launch a command window by holding 'Alt' + 'Shift' and clicking on the window. In the drop down menu you will see "Open Command Window Here". In that command window you will write 'pyinstaller --onefile script.py' where "script.py" is the name of the script you want to generate the .exe for. I hope this helps someone else as much as it helped me.

Ryan Hill
  • 31
  • 3
1

Py2Exe just released Py2Exe for Python 3!

To install on windows do this:

cd C:\Python34\Scripts

Then run:

pip install py2exe

And your done you can now run the normal commands, and if your having trouble here are the docs.

Dharman
  • 30,962
  • 25
  • 85
  • 135
LoganTCP
  • 11
  • 2
0

I note that the original question was asked just shy of 4 years ago. Visiting https://pypi.org/project/py2exe/ the version offered is still at 0.9.2.2

Using the command pip install py2exe and checking the py2exe directory created on my system, I only see options for Python 3.3 and 3.4 installed.

Given that the last time py2exe was updated was in 2014, my guess is that it is no longer being developed so folks wanting to create executables using versions of Python more recent than 3.4 should look elsewhere for a solution.

Jim
  • 61
  • 9
-1
**
#I use pyinstaller
#pip install pyinstaller
#command line:
#pyinstaller --onedir --onefile --name=what you call it --console myscript.py
#pyinstaller --onedir --onefile --name=what you call it --windowed myscript.py
#pyinstaller -h help file
#pyinstaller -d -f -n=file name -c or -w myscript.py
**
-4

There is py2exe for python versions that can be downloaded at https://pypi.python.org/pypi/py2exe/0.9.2.0#downloads