【问题标题】:installing pip on python 2.7.8 on windows在 windows 上的 python 2.7.8 上安装 pip
【发布时间】:2018-07-24 14:38:16
【问题描述】:

我正在尝试为 python 2.7.8 安装模块 pip,即 arcGIS 为您安装的模块。

我正在使用引导方法安装 pip,当我使用命令提示符运行 get-pip.py 时遇到错误。

我收到以下错误:

Warning (from warnings module):   File
"c:\users\vlaw\appdata\local\temp\tmpzamnrk\pip.zip\pip\_vendor\requests\packages\urllib3\util\ssl_.py",
line 122 InsecurePlatformWarning: A true SSLContext object is not
available. This prevents urllib3 from configuring SSL appropriately
and may cause certain SSL connections to fail. You can upgrade to a
newer version of Python to solve this. For more information, see
https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
Could not fetch URL https://pypi.python.org/simple/pip/: There was a
problem confirming the ssl certificate: [Errno 1] _ssl.c:510:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate
verify failed - skipping Requirement already up-to-date: pip in
c:\esripyfldr\arcgis10.3 Collecting setuptools

Warning (from warnings module):   File
"c:\users\vlaw\appdata\local\temp\tmpzamnrk\pip.zip\pip\_vendor\requests\packages\urllib3\util\ssl_.py",
line 122 InsecurePlatformWarning: A true SSLContext object is not
available. This prevents urllib3 from configuring SSL appropriately
and may cause certain SSL connections to fail. You can upgrade to a
newer version of Python to solve this. For more information, see
https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
Could not fetch URL https://pypi.python.org/simple/setuptools/: There
was a problem confirming the ssl certificate: [Errno 1] _ssl.c:510:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate
verify failed - skipping [31m  Could not find a version that
satisfies the requirement setuptools (from versions: )

我正在使用我公司提供的互联网。你认为防火墙是它给我错误的原因吗?

【问题讨论】:

  • 你为什么用2.7版本?使用它有什么特定目的吗?您可以使用 3.0 以后的版本。它默认安装了 pip 。所以不会有任何问题。
  • 我的python是由ArcGIS软件安装的。 Python 2.7.8 是唯一与该软件兼容的版本。身份证。

标签: python pip arcgis arcpy


【解决方案1】:

您必须在防火墙内设置代理并从防火墙外安装文件。

Ubuntu

export http_proxy="http://<<username>>:<<password>>@<<proxy server>>:<<proxy_port>>"
export https_proxy="https://<<username>>:<<password>>@<<proxy server>>:<<proxy_port>>"

Windows

set HTTP_PROXY=http://<<username>>:<<password>>@<<proxy server>>:<<proxy_port>>
set HTTPS_PROXY=https://<<username>>:<<password>>@<<proxy server>>:<<proxy_port>>

【讨论】:

  • 运行命令时是否需要更改用户名、密码和proxy_port?
  • @VincentLaw 是的,这就是&lt; &gt; 通常的意思。
【解决方案2】:

我觉得你应该先下载get-pip.py 然后运行python get-pip.py

如果这不起作用,请使用python get-pip.py --prefix=/usr/local/

希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 2015-02-03
    • 2015-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-21
    • 1970-01-01
    • 2013-11-07
    相关资源
    最近更新 更多