When working on data processing projects with ArcGIS Desktop (non-Pro version), extending arcpy functionality often requires installing third-party libraries. Since Python 2 doesn't include pip by default, this guide outlines the installation process.

Prerequisites

  1. Install ArcGIS Desktop
  2. Add Python path to environment variables (e.g., C:\Python27\ArcGIS10.X)
  3. Remove other Python paths from system variables

Installation Workflow

Step 1: Install setuptools

  1. Download setuptools-12.0.1.tar.gz
  2. Unzip and navigate to directory in Command Prompt:

    cd /d C:\your\setuptools\path
  3. Execute installation:

    python setup.py install

Step 2: Install pip

  1. Download pip-1.5.4.tar.gz
  2. Navigate to directory:

    cd /d C:\your\pip\path
  3. Install pip:

    python setup.py install

Installing Third-Party Libraries

Online Installation (Internet-connected environments)

pip install library_name

Offline Installation (Intranet environments)

  1. Download wheel files using mirror sites:

    pip download -i https://pypi.tuna.tsinghua.edu.cn/simple/ pypinyin -d "E:\Temp"
    # Alternative mirror:
    pip download -i https://mirrors.aliyun.com/pypi/simple/ pypinyin -d "E:\Temp"

  2. Install downloaded wheels:

    cd /d E:\Temp
    pip install typing-3.10.0.0-py2-none-any.whl
    pip install enum34-1.1.10-py2-none-any.whl
    pip install pypinyin-0.51.0-py2.py3-none-any.whl

Reference Resources

https://pan.baidu.com/s/1L2Kz3wUcwld0wfh7kbcMiA?pwd=GIS6
Extraction code: GIS6