Is there a py2exe version that's compatible with python 3.5?

筅森魡賤 提交于 2019-12-17 18:23:05

问题


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?


回答1:


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




回答2:


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



回答3:


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




回答4:


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.




回答5:


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.




回答6:


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.




回答7:


**
#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
**



回答8:


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



来源:https://stackoverflow.com/questions/32963057/is-there-a-py2exe-version-thats-compatible-with-python-3-5

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!