0

I want to convert my python file to a .exe file using pyinstaller. I have installed pyinstaller using pip install pyinstaller, but when I try use pyinstaller I get:

C:\Users\Varnith\Desktop\program>pyinstaller --onefile main.py
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
Alex Waygood
  • 6,304
  • 3
  • 24
  • 46
  • 1
    is it in the path? did you use a fully qualified path for pyinstaller and it still does not work? – Patrick Artner Sep 28 '21 at 08:10
  • This question has already been asked, lots of times: "Pyinstaller is not recognized as internal or external command" https://stackoverflow.com/q/45951964/13990016 – Alex Waygood Sep 28 '21 at 08:39

2 Answers2

0

The problem is pyinstaller hasn't been added to path. Make sure you installed it properly. If on Windows, try:

pip install pyinstaller

or

py -m pip install pyinstaller

Otherwise, pip3 & python3

Mark
  • 214
  • 2
  • 13
0

Find the path using pip:

C:\Users\Hamid>pip install pyinstaller
Requirement already satisfied: pyinstaller in c:\python3.9\lib\site-packages (4.5.1)

then add given path to PATH. (also you can see this video about converting python code to installable application: https://www.youtube.com/watch?v=UZX5kH72Yx4 )

Hamid
  • 1
  • 4