Code Monkey home page Code Monkey logo

arcpy's People

Contributors

mkoohafkan avatar

Stargazers

 avatar

Watchers

 avatar  avatar

arcpy's Issues

fix the environment issues and document solution

There are some issues with directly using the environment as cloned from within the ArcGIS Pro application. No idea why but something about the way ArcGIS Pro clones the environment doesn't play nice with reticulate. It appears that there are two solutions:

  1. After cloning the environment within ArcGIS Pro, clone it again from the anaconda prompt and then use that environment (the base arcpy environment doesn't show up in the environment listing, but maye you can clone it directly by providing a full path).
  2. Following this ESRI documentation, create an environment from scratch and install arcpy and/or argis modules directly from the ESRI conda channel. One issue with this is that you need to install the module version from the channel that matches with your ArcGIS Pro installation, i.e., conda install --name <conda env> -c esri arpy=<Pro Version>

Preliminary tests suggest that option 1 works.

use conda search and user-supplied arcgis version to create correct environment

conda search arcpy -c esri provides a listing of arcpy module versions:

# Name                       Version           Build  Channel
arcpy                    2.3.1.15800 py36_arcgispro_1  esri
arcpy                            2.7 py37_arcgispro_26794  esri
arcpy                            2.7 py37_arcgispro_26810  esri
arcpy                            2.8 py37_arcgispro_29717  esri
arcpy                            2.8 py37_arcgispro_29724  esri
arcpy                            2.8 py37_arcgispro_29734  esri
arcpy                            2.9 py37_arcgispro_32649  esri
arcpy                            2.9 py37_arcgispro_32704  esri
arcpy                            2.9 py37_arcgispro_32739  esri
arcpy                            3.0 py39_arcgispro_36045  esri
arcpy                            3.0 py39_arcgispro_36056  esri
arcpy                            3.0 py39_arcgispro_36057  esri
arcpy                            3.1 py39_arcgispro_41748  esri
arcpy                            3.1 py39_arcgispro_41751  esri
arcpy                            3.1 py39_arcgispro_41759  esri
arcpy                            3.1 py39_arcgispro_41791  esri

Output can be retrieved programmatically via flag --json. Given the ArcGIS Pro version (supplied by the user) it is therefore possible to determine the required python version automatically rather than having the user provide it.

Retrieving the module list can be implemented right now via

jsonlite::fromJSON(system2(reticulate::conda_binary(), c("search", "arcpy", "-c", "esri", "--json") stdout = TRUE)

but if reticulate implements conda_search() it would be a little cleaner.

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.