Converting .py to .exe with Anaconda

后端 未结 3 1893
有刺的猬
有刺的猬 2021-01-01 00:04

I made a python program using PyGame which is only available for Python 2.7 so that is my python version. I am using Anaconda because it is easier to install modules and to

3条回答
  •  别那么骄傲
    2021-01-01 01:01

    How to create an executable using Anaconda 3 (specifically Anaconda Prompt) for Windows.

    1 - Make sure pyinstaller is installed in your anaconda

    pip install pyinstaller

    2 - Move to the directory of your python script

    cd C:\Users....\program.py

    3 - Just type the following:

    pyinstaller --onefile program.py

    If everything goes well, in the folder where you have your script.py you it will be created many folders and your executable is inside folder "dist".

    If my explanation is confusing go here: https://medium.com/dreamcatcher-its-blog/making-an-stand-alone-executable-from-a-python-script-using-pyinstaller-d1df9170e263

提交回复
热议问题