-4

I would like to convert a python code with command line argument into windows executable using pyInstaller. I run my python program as follows

python myPython 1
EdChum
  • 376,765
  • 198
  • 813
  • 562
  • Possible duplicate of [How can I convert a .py to .exe for Python?](https://stackoverflow.com/questions/41570359/how-can-i-convert-a-py-to-exe-for-python) – realmanusharma Oct 22 '18 at 04:47

1 Answers1

0

Firstly i wonder that you don't get articles related to to this in your Google search.

First Install pyinstaller by running this command

pip install pyinstaller

For Additional Help https://pyinstaller.readthedocs.io/en/stable/installation.html

Open command prompt, Now navigate to the directory in which your python file (using the cd command ) is located then enter the code

pyinstaller --onefile .py

This will create a standalone executable file (That i expect you are asking). Below is the link to a stackoverflow question you missed to read. Edit : in the same directory a folder name dist will get created which have your single executable.

How can I convert a .py to .exe for Python?

realmanusharma
  • 330
  • 2
  • 10