installing pip on python 2.7.8 on windows

眉间皱痕 提交于 2019-12-23 19:16:56

问题


I am trying to install the module pip to python 2.7.8 the one that arcGIS installs for you.

I am doing the bootstrap method of installing pip and I am running into an error when I run the get-pip.py with cmd.

I get the following error:

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: )

I am using my company internet. Do you think the firewall is the reason it's giving me the error?


回答1:


You have to set proxies as you are inside firewall and installing files form outside firewall.

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>>



回答2:


I think you should first download get-pip.py and then run python get-pip.py.

If this doesn't work use python get-pip.py --prefix=/usr/local/.

Hope this helps.



来源:https://stackoverflow.com/questions/48780135/installing-pip-on-python-2-7-8-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!