Home > database >  Pyinstaller not recognized after installing
Pyinstaller not recognized after installing

Time:06-14

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)

CodePudding user response:

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

CodePudding user response:

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

  • Related