Today i was trying to install py2exe in my 3.13 version of python. I have been working with python for some time now(never professionally), and have worked with a few basic modules, like time and math, but have never worked with packages. Today, i wanted to try converting my .py files to .exe. I have found things like py2exe and auto-py-2-exe, but both do not say they support 3.13. Also, whenever i try to install something using command prompt, it says it does not recognize pip or python. when I put in python by itself, it prompts me to download python 3.12 from Microsoft store. Just to restate, i am decent enough with python, but i have never worked with packages. I am operating off a windows 11 laptop. I am simply looking for help getting to the end point of converting these files and possibly some help with packages in the future.
update: I found how to make a path to python, so it does work now in command prompt, and update pip as instructed in this article,Installing Packages - Python Packaging User Guide. However, pip is still not recognized in this form: pip install py2exe, so i can’t yet install packages.
My problem is solved. I needed to downgrade to 3.12.7, create a path to python, and use:
py -m pip install FILE_LOCATION_OF_PACKAGE
rather than:
pip install FILE_LOCATION_OF_PACKAGE
I am also facing the same issue. Can you suggest me the steps you took to resolve specially FILE_LOCATION_OF PACKAGE?
Hi, I am terribly sorry if I have caused any confusion. I don’t really remember what I intended to mean in this post, so let me give you a quick walk-through.
To start, I am pretty sure “FILE_LOCATION_OF_PACKAGE” should have meant desired package. The thing is though, py2exe does not support 3.12.7, so that does not make sense in the first place.
In my experience, you have two options:
- You can downgrade to 3.11.9 and get the .whl file for py2exe off the PyPI website here, and run the command:
python -m pip install PATH_TO_WHL_FILE
- what I did rather was get auto-py-to-exe. Please note py2exe is a module for python, where auto-py-to-exe is a standalone program with GUI. auto-py-to-exe is available on 3.12.7, so that should not be an issue. Run the command:
python -m pip install auto-py-to-exe
Then you will find the auto-py-to-exe program in:
"C:\Users\USERNAME\AppData\Local\Programs\Python\Python312\Scripts"
as autopytoexe or auto-py-to-exe.
Again, sorry for the confusion, and I hope this helps!