Skip to main content

Locates arcpy and makes it available to the running python distribution

Project description

PyPI version


Searches the (windows) system for arcgis and makes arcpy available to python (regardless of pythonpath/system path/registry settings). It's typically used when using a python distribution that's wasn't installed by ArcGIS. Ones downloaded direct from or a conda environment for two examples.

If ArcGIS is not found, an ImportError is thrown.

Use pro=True to target ArcGIS Pro instead of ArcGIS Desktop.

Example usage

ArcGIS Desktop

    import archook #The module which locates arcgis
    import arcpy
except ImportError:
    # do whatever you do if arcpy isnt there.

ArcGIS Pro

    import archook #The module which locates arcgis
    import arcpy
except ImportError:
    # do whatever you do if arcpy isnt there.

Note: You may need to create a conda-meta directory in your Python interpreter's directory (referred to by sys.prefix) if you get an error like the following:

ImportError("arcpy needs to run within an active ArcGIS Conda environment")


Regular install with pip:

pip install archook

Install in developer mode using Git:

git clone
pip install --editable .\archook

Install in developer mode manually:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

archook_dbc-202202.1.2045.tar.gz (12.1 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page