由于ArcGIS与Python版本兼容性问题,目前仍然在使用Python2.7,安装第三方组件十分不便。
安装PIP
由于Python2.7版本较老,默认不像3.0自带pip,需要手动安装。安装步骤:
(1)将C:\Python27\ArcGIS10.2添加到系统环境变量Path中,这样才能在cmd中使用python命令。
(2)在https://pypi.org/下载setuptools。
解压后,使用python setup.py install命令安装。
安装后Scripts文件夹就多了easy_install.
(3)在https://pypi.org/下载pip(注意版本,支持python2.7.5最后一个版本的是20.3.4)。
解压后,使用python setup.py install命令安装。
安装后Scripts文件夹就多了pip.
(4)将C:\Python27\ArcGIS10.2\Scripts添加到系统环境变量Path中,就可以使用pip命令了。
镜像pip
如果直接使用pip命令将提示如下错误:
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
在%appdata%(即C:\Users\用户名\AppData\Roaming)下新建pip文件,并增加pip.ini配置文件,设置镜像路径。
[global] index-url = http://mirrors.aliyun.com/pypi/simple/ [install] trusted-host=mirrors.aliyun.com标签:Python,2.7,Pyton,python,pip,install,PIP,安装 From: https://www.cnblogs.com/liweis/p/17065981.html