ArcPy Development: Eclipse; PyDev; Virtualenv & Git Repository

4185
4
Jump to solution
02-15-2016 11:24 AM
PeterWilson
Occasional Contributor III

I've been using Eclipse and PyDev as my IDE environment for Python over the last few years. I've not used a virtual environment or git repository up until now as my code has been simple scripts to automate daily tasks within ArcGIS.

I have found that managing my scripts and more recently my python programs is becoming more cumbersome. I have Python 2.7.5 32 bit as well as 64 bit installed. I'm using more and more 3rd party site packages such as ArcHydro ; HEC-RAS ; HEC-GeoHMS ; HEC-GeoRAS ; TauDEM to mention just a few. Some of my code is 32 bit as there are no 64 bit packages available or some of ArcGIS tools won't run within 64 bit. My hydrological python programs are 64 bit to take advantage of the additional memory and threading.

I'm looking for advice from the community on best practices (pythonic) for setting up a python development environment using Eclipse\PyDev with Virtualenv and a Git Repository. Based on my current online research its not that straight forward to get the Python versions installed by ArcGIS to work within a virtual environment using Python virtualenv.

0 Kudos
1 Solution

Accepted Solutions
PeterWilson
Occasional Contributor III

Hi Dan

Thanks for the feedback, I found a solution on the USGS site that might help anyone else wishing the setup Eclipse\PyDev and Virtualenv​.

Calling arcpy from an external virtual Python environment

Regards

View solution in original post

4 Replies
DanPatterson_Retired
MVP Emeritus

recent discussions on python environments may be of interest Peter

Connecting Arcpy to Your Jupyter Notebook

Anaconda interfering with running spatial statistics in ArcMap 10.2

and I never got much feedback on my initial post

Re: Anaconda use

Paths and stuff are easily handled on clean installations... a bit of digging and fussing for patching things up is needed having spent some time with the site.py script (import site and then run site.main or site._script )

PeterWilson
Occasional Contributor III

Hi Dan

Thanks for the feedback, I found a solution on the USGS site that might help anyone else wishing the setup Eclipse\PyDev and Virtualenv​.

Calling arcpy from an external virtual Python environment

Regards

DanPatterson_Retired
MVP Emeritus

Good ... perhaps Curtis Price​ should have chimed in, since he edited the article you refer to

curtvprice
MVP Esteemed Contributor

I just posted my current method for doing this here. This usercustomize.py method allows you to install as many pythons you want to tweak this script to handle the environment (ie from desktop, from anaconda virtual env, from eclipse, whatever)

Using a user-specific Python startup script