0

I have a Windows machine with a ArcGIS 10.3.1 (w/ Python 2.7.8) install that the powers that be DO NOT want me to uninstall/reinstall.

I would like to find a way to:

  1. set up some virtual environments (in a way to seperate arcgis-python from other forms of python & packages)
  2. set up pip (since it does not come with this version preinstall)

Is there a way to do this?

My system PATH for python are currently 32-bit:

C:\Python27\ArcGIS10.3;C:\Python27\ArcGIS10.3\Lib\site-packages

PolyGeo
65.5k29 gold badges115 silver badges350 bronze badges
asked Sep 7, 2017 at 22:28

1 Answer 1

2

Can you just add pip and virtualenv to the existing instance of python?

If not you can install a new instance of python in a different folder. I haven't test this workflow with virtualenv but it works with plane scripting. You can then install pip to this instance. Finally you can copy the arcpy path files to the new folder so arcpy will work in the new instance. There is a wealth of info on this thread but here are the broad steps I have used in the past.

  1. Download and install a new version of python 2.7
  2. In this new location set up pip, or if you are using the latest release of python I think it comes preinstalled
  3. Copy the arcpy path files from the arcgis instance, C:\Python27\ArcGIS10.3\Lib\site-packages\Desktop10.3.pth, to your new instance C:\Python27\[new instance]\Lib\site-packages
  4. Use pip to install virtualenv
  5. Use pip to install other packages that arcpy uses that aren't installed by default. I think numpy and matplotlib are the only 2.
answered Sep 8, 2017 at 18:08
1
  • Since we need other packages (such as numpy), i also added one additional line to the ptn file: c:\Python27\ArcGIS10.8\Lib\site-packages\ Commented Jun 21, 2021 at 8:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.