0

before describing my problem i would like to also mention that while the first time intallation i did not check the path option that appears and neither did i check the option for environment variable. what the problem is :

  1. when i try to give any pip command in my command prompt it says that

    pip is not a recognized internal or external command"

  2. when i tried giving a py command it said

    can't find a default python

  3. pip files are missing from the script folder

what I have tried

  1. i have tried reinstalling and checking all the checkboxes that are available in the modifier (result: i ended up at the point i started)
  2. i have tried using the repair option and then using the modify option. still to no avail.
  3. i have tried copying the bootstrap of pip, converted into .py form and moving it to scripts folder.
  4. i have tried using the command py -m pip install
  5. i referred to the help available on the official site what i need

i need the complete instruction as detailed as possible to what i can do to correct the horrible horrible mistake i have made.

James Z
  • 12,209
  • 10
  • 24
  • 44

1 Answers1

0

Looks like your Python installation along with pip are not correctly configured in the PATH environment variable.

Firstly, you should find the paths for both installations. If you haven't changed the default directory while installing Python, the paths should look like in the example below. First one is the directory with python.exe, and the Scripts directory is the one where pip.exe is present.

C:\Users\yourusername\AppData\Local\Programs\Python\Python39
C:\Users\yourusername\AppData\Local\Programs\Python\Python39\Scripts

Secondly, you should edit the PATH variable by adding those found paths to it.

Type "Edit environment variables for your account" in search, and open it. System properties windows shall open, after that click the Environment variables... button located at the lower right corner. Next, in the User variables for user at the top part of the window, select Path and then click Edit.... In the newly opened window, click the button labeled New and then add both of the previously found paths.

This is how it should look at the end.

After you have added the paths, you are done. Restart your code editor or you may restart your PC to be sure.

kesetovic
  • 144
  • 6
  • hi thanks for answering my question. i did as you mentioned it all went well till copying the path variable of python.exe and pasting it in the places you mentioned but when i went to look for pip.exe it wasn't there. after that i repaired all the files and tried to use the modifier download pip and add it to the environment variables. after that i restarted the computer and the command prompt but so far nothing has changed. thank you – Nyce da lee Jun 30 '21 at 12:16