Pip 安装 - Python 2.7 - Windows 7 [英] Pip install - Python 2.7 - Windows 7

查看:107
本文介绍了Pip 安装 - Python 2.7 - Windows 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从

解决方案

对于新版本

旧版本的python可能没有安装pip,get-pip会报错.请更新您的 Python(截至 2018 年 8 月 12 日的 2.7.15).

所有当前版本都可以选择安装 pip 并将其添加到路径中.

步骤:

  1. 以管理员身份打开 Powershell.(win+x 然后 a)
  2. 输入 python -m pip install .

如果 python 不在 PATH 中,它会抛出一个错误,说 unrecognized cmd.要修复,只需将其添加到下面提到的路径中[1].

[旧答案]

Python 2.7 必须预先安装 pip.

尝试通过以下方式安装您的软件包:

  1. 以管理员身份打开 cmd.(win+x 然后 a)
  2. 转到脚本文件夹:C:\Python27\Scripts
  3. 输入 pip install "package name";.

注意:否则重新安装python:https://www.python.org/downloads/

[1] 另请注意:您必须在 C:\Python27\Scripts 中才能使用 pip 命令,否则通过键入将其添加到您的路径中:[Environment]::SetEnvironmentVariable("Path","$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")

I download the get-pip.py from https://pip.pypa.io/en/stable/installing/ . Then i changed path in: system-variable environment into : C:\Python27\ArcGIS10.3\Lib\site-packages after that i tried to run in from the cmd and this is the result:

解决方案

For New versions

Older versions of python may not have pip installed and get-pip will throw errors. Please update your python (2.7.15 as of Aug 12, 2018).

All current versions have an option to install pip and add it to the path.

Steps:

  1. Open Powershell as admin. (win+x then a)
  2. Type python -m pip install <package>.

If python is not in PATH, it'll throw an error saying unrecognized cmd. To fix, simply add it to the path as mentioned below[1].

[OLD Answer]

Python 2.7 must be having pip pre-installed.

Try installing your package by:

  1. Open cmd as admin. (win+x then a)
  2. Go to scripts folder: C:\Python27\Scripts
  3. Type pip install "package name" .

Note: Else reinstall python: https://www.python.org/downloads/

[1] Also note: You must be in C:\Python27\Scripts in order to use pip command, Else add it to your path by typing: [Environment]::SetEnvironmentVariable("Path","$env:Path;C:\Python27\;C:\Python27\Scripts\", "User")

这篇关于Pip 安装 - Python 2.7 - Windows 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆