I have found the following two sites explaining how to setup Python Virtualenv for ArcGIS:
I've successfully created a virtual environment under my external drive:
When I followed the second part of ArcGIS and Virtual Environments part 2: as well as Calling arcpy from an external virtual Python environment: to create the Python Path file to the ArcPy and my ArcHydroTools is where the comes apart.
As instructed I ran the following within my Python IDLE:
I then created the Python Path file from the list above:
I copied the path file (arcpy64bit_paths.pth) under the following directory:
When I setup the Python Interpreter using the virtualenv within Eclipse the following paths are recognised:
ArcPy and ArcHydroTools not recognised:
When I setup the Python Interpreter using the ArcGIS Python within Eclipse the following paths are recognised:
ArcPy and ArcHydroTools are recognised:
Any help to resolve the following will be appreciated, as I really need to use virtualenv to manage my Python Environment due to different versions of packages required.
Let's be clear first off: I know absolutely nothing about Eclipse.
It's really important to make sure the order of paths in sys.path is correct. I think you may be breaking this by include everything in your .pth file. You should
1. Make sure the virtual environment is compatible with ArcGIS (esp python, numpy versions)
2. Use Esri's .pth file that they put in the \Python27\Desktop10.2x64\site-packates folder. You should only have to copy that file.
If you still are having problems, I suggest comparing the sys.path when launching Esri's 64 bit Python with what you are getting in your virtualenv. The order matters.
Thanks for the following. I'm currently reading up on sys.path to better understand how it works as well as virtualenv\virtualenvwrapper. I'll post my workflow once I've got it working as I'm also going to be using GitHub for version management of my code.
I copied the following two Python pth files:
to the following directory:
When I try to install the the specific versions of python packages required for ArcGIS:
based on the python requirements for ArcGIS 10.3.1
I'm unable to install Numpy (1.7.1) within my virtualenv via command line:
Python: pip install numpy==1.7.1
Python: Pip install numpy==1.7.1 error message.
If I install numpy without specifying a version it works perfectly, no error messages. I tried downloading numpy-1.7.1.win32-py2.7.exe but unfortunately you are unable to change the directory into which it will install. Any help to resolve the following will truly be appreciated.
Sorry I can't help, I have been using at least
python 3.4.x, numpy 1.9.x and scipy 0.16.x for quite a while even when python 2.7.x was the only show in town (I think back to arc 10.1 or so).
I have no need for virtual environments since I just run 3 machines all using different configurations... I find it easier to keep track of stuff than remembering what I booted up on
I have never messed with virtualenv - I highly recommend using anaconda instead as you tell it what you want and it finds all compatible dependencies, for example:
conda create -n arc1022 python=2.7.5 numpy=1.7.1 matplotlib=1.3 pandas
it will then create a virtual environment that will work with arcpy for Arc 10.2.2 for you. There are a LOT of dependencies in there that I couldn't imagine being able to keep track of.
Just heard for sure that the plans are to ship Anaconda will be shipped with ArcGIS Pro 1.3. This is really great news.