C:\Users\alaa_>
C:\Users\alaa_>pip install pyinstaller
'pip' is not recognized as an internal or external command,
operable program or batch file.
Assistant
It looks like pip is not recognized on your command line, which could be due to a few reasons, such as Python not being installed properly or the pip executable not being in your system's PATH.
Here's a step-by-step guide to resolve this:
1. Ensure Python is Installed
First, make sure Python is installed on your system. To check if Python is installed, you can run:
python --version
or
python3 --version
If Python is installed, you will see something like:
Python 3.x.x
2. Add Python to PATH (If necessary)
If Python is installed but not in your PATH, you need to add it manually:
Find the Python Installation Path:
The default installation path is usually C:\Python39 for Python 3.9, or C:\Users\<YourUsername>\AppData\Local\Programs\Python\Python39.
Add to Environment Variables:
Open the Start Search, type in “env”, and select “Edit the system environment variables”.
In the System Properties window, click on the “Environment Variables…” button.
In the System Variables section, find the Path variable and select it. Click “Edit…”.
Click “New” and add the path to your Python installation (e.g., C:\Python39\ and C:\Python39\Scripts\).
3. Install pip (If necessary)
If pip is not installed, you can get the get-pip.py script to install it: