简体   繁体   中英

Pip is not installed with python 3.7.3 even i did selected it on install

I installed python to my new computer (Windows 7). I needed to use pip to install packages but I couldn't find it in the folder where it was supposed to be located.

I have tried to bootstrap it

python -m ensurepip --default-pip

and get-pip.py didn't work either (Got a bunch of errors)

I have looked for the folder it should be in to make sure I was looking in the right place

import os
import sys
print (os.path.dirname(sys.executable) + '\Scripts\\')

which gives 'C:\Users\Dell\AppData\Local\Programs\Python\Python37-32\Scripts\' as an output (Folder where I was looking in the first place). That folder is empty. I have 'show hidden files, folders and drives' on, I have searched for it from my entire computer, re-installed python and tried older (and 3.7.4 since it was released the time i noticed that pip was missing) versions, i have even added that empty folder to PATH and called for pip to make sure that it isn't just hidden from me. I have ran a repair and modify on installer too. Am I just missing some obvious step or is something wrong elsewhere?

Double-Click again on your python3.7 Windows x86 executable installer (ie: setup.exe file). Then follow this pattern click on Modify > pip > add python to environment variable

图像1

图像1 图3

Finally click on install and its done . * Note I am using python3.6.7 but the steps are same for python3.7.3

If you are having trouble installing pip just do the following things.

  1. Install Python 3x normally.
  2. Go to properties of my computer -> Advance system settings -> new -> give vairable name as Path and variable value as the location of Python scripts and save it in my case it is.

    C:\Users\Atharva\AppData\Local\Programs\Python\Python37-32\Scripts

  3. Restart your computer and open cmd.
  4. now you can use pip commands.
  5. You should consider upgrading via the 'python -m pip install –upgrade pip' command.

Thats all

Type the following command in a CMD window:

python -m ensurepip --default-pip

This will download and install pip as a package. This code worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM