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?
If you are having trouble installing pip just do the following things.
C:\Users\Atharva\AppData\Local\Programs\Python\Python37-32\Scripts
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.