I found a similar question, but it didn't match my exact problem. So basically I installed Pyinstaller using pip install pyinstaller
and I even tried python -m pip install pyinstaller
(windows terminal pip commands) but then I tried to use it. I just entered pyinstaller
in the terminal and it told me it was not recognized as an internal or external command. I tried reinstalling it several times but nothing changed. What I'm expecting to happen is for the command to work. Please help. (I am on windows 10 using python 3.9 and pip 22.1.2)

- 101
- 1
- 10
-
`pip install pyinstaller` worked? From which env you launched `pyinstaller`? – NicoCaldo Jun 14 '22 at 11:58
-
1You can run command from anywhere if its added to your path. Otherwise provide full path to your pyinstaller – Drako Jun 14 '22 at 11:58
-
@NicoCaldo what do you mean – Spiceinajar Jun 14 '22 at 11:59
-
@NicoCaldo I ran them in my terminal as the other ones – Spiceinajar Jun 14 '22 at 12:01
-
What editor do you use? You can run `pyinstaller` from python too as documented in https://pyinstaller.org/en/stable/usage.html?highlight=--add-data#running-pyinstaller-from-python-code – Clemens Tolboom Jun 14 '22 at 13:26
2 Answers
Looks like your PATH variable doesn't include the path to the pyinstaller
. You have to add the path to the PATH variable.
Add the following path (Assuming the most common case)
C:\Users\[USERNAME]\AppData\Local\Programs\Python\[python_folder]\Scripts
You have to check whether the path exists and change it accordingly before adding it.
Find how to add path in windows here

- 711
- 4
- 11
-
-
-
-
-
C:\Users\*******\AppData\Local\Programs\Python\Python39\Scripts i still added the directory but the exe was already in the directory before i did that it still doesnt work – Spiceinajar Jun 14 '22 at 12:33
-
-
-
@spiceinajar did you mean that `pip show` doesn't show anything – Kavindu Ravishka Jun 14 '22 at 12:45
-
-
Ah, No need to move it. Just add its current location (current path) to PATH variable – Kavindu Ravishka Jun 14 '22 at 12:49
-
-
-
nothing. but what confuses me is that its giving me multiple directories when i did [pip sohw] – Spiceinajar Jun 14 '22 at 12:59
First of all: Search for your pyinstaller executable. It should be stored somewhere %AppData%\local.
>cd C:\Users\username\AppData
>dir /s *pyinstaller*
Once you have found it, and the folder it is located in, you may add it to your path. (in my example, i found it located at: C:\Users\username\AppData\Local\Programs\Python\Python39\Scripts).
Change your path (temporarly):
>set PATH="%PATH%;C:\Users\username\AppData\Local\Programs\Python\Python39\Scripts\"
Change your path (permanently):
>setx PATH "%PATH%;C:\Users\username\AppData\Local\Programs\Python\Python39\Scripts\"
Optionnaly: This link: How to add (permanently) a folder to a PATH in windows from the GUI

- 116
- 5