Giter Club home page Giter Club logo

archook's Introduction

PyPI version

archook

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 Python.org 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

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

ArcGIS Pro

try:
    import archook #The module which locates arcgis
    archook.get_arcpy(pro=True)
    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")

Installation

Regular install with pip:

pip install archook

Install in developer mode using Git:

git clone https://github.com/JamesRamm/archook.git
pip install --editable .\archook

Install in developer mode manually:

archook's People

Contributors

mhw-at-yg avatar jamesramm avatar frantarkenton avatar logan-pugh avatar bricegnichols avatar dependabot[bot] avatar geographika avatar timtroendle avatar sandeepgadhwal avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.