简体   繁体   English

Pip 没有安装 python 3.7.3,即使我在安装时选择了它

[英]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 添加到环境变量

图像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 * 注意我使用的是python3.6.7,但是python3.7.3的步骤是一样的

If you are having trouble installing pip just do the following things.如果您在安装 pip 时遇到问题,请执行以下操作。

  1. Install Python 3x normally.正常安装 Python 3x。
  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.转到我的计算机的属性 -> 高级系统设置 -> 新建 -> 将变量名称作为路径和变量值作为 Python 脚本的位置,并在我的情况下保存它。

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

  3. Restart your computer and open cmd.重新启动计算机并打开 cmd。
  4. now you can use pip commands.现在你可以使用 pip 命令了。
  5. You should consider upgrading via the 'python -m pip install –upgrade pip' command.您应该考虑通过“python -m pip install –upgrade pip”命令进行升级。

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.

相关问题 Python 抛出 ModuleNotFoundError 即使我使用 pip install 安装了本地 package - Python throws ModuleNotFoundError even though I installed a local package using pip install Python pip安装qibuild异常,然后我安装了pip呢。 - Python pip install qibuild exception then I installed pip yet. 我是否正确安装了pip? - Did I install pip correctly? Pip 即使我下载了 python 也显示未安装? - Pip showing up an not installed even though I downloaded python? 即使我安装了 pip,Matplotlib 也无法在 python 中工作 - Matplotlib won't work in python even though i pip installed it 安装适用于Python 3.7.3的vtk工具包 - Install vtk toolkit for Python 3.7.3 尝试安装模块时,即使 3.7 已经安装,pip 也会安装 python3.5 - When trying to install modules pip installs python3.5 even though 3.7 is already installed ModuleNotFoundError:即使我安装了 pip 安装 websocket,也没有名为“websocket”的模块 - ModuleNotFoundError: No module named 'websocket' even though I installed pip install websocket 为什么使用 pip 安装 package 后仍然出现“找不到模块”错误? - Why do I still get the “module not found” error even after having installed the package using pip install? PIP 安装 package - 已安装但 python 未导入 - PIP install package - installed but python is not importing
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM