[英]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).我将 python 安装到我的新计算机(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.
我需要使用 pip 来安装软件包,但在它应该位于的文件夹中找不到它。
I have tried to bootstrap it我试图引导它
python -m ensurepip --default-pip
and get-pip.py didn't work either (Got a bunch of errors)和 get-pip.py 也没有工作(有一堆错误)
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).它给出了 'C:\Users\Dell\AppData\Local\Programs\Python\Python37-32\Scripts\' 作为输出(我首先查看的文件夹)。 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.
我打开了“显示隐藏的文件、文件夹和驱动器”,我从我的整个计算机中搜索了它,重新安装了 python 并尝试了旧版本(和 3.7.4,因为它在我注意到 pip 丢失的时候发布)版本,我什至将那个空文件夹添加到 PATH 并调用 pip 以确保它不只是对我隐藏。 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).再次双击您的 python3.7 Windows x86 可执行安装程序(即:setup.exe 文件)。 Then follow this pattern click on Modify > pip > add python to environment variable
然后按照此模式单击修改 > pip > 将 python 添加到环境变量
Finally click on install and its done .最后点击安装就完成了。 * Note I am using python3.6.7 but the steps are same for python3.7.3
* 注意我使用的是python3.6.7,但是python3.7.3的步骤是一样的
If you are having trouble installing pip just do the following things.如果您在安装 pip 时遇到问题,请执行以下操作。
C:\Users\Atharva\AppData\Local\Programs\Python\Python37-32\Scripts
C:\Users\Atharva\AppData\Local\Programs\Python\Python37-32\Scripts
Thats all就这样
Type the following command in a CMD window:在 CMD 窗口中键入以下命令:
python -m ensurepip --default-pip
This will download and install pip as a package.这将下载并安装 pip 作为一个包。 This code worked for me.
这段代码对我有用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.