1

I have both Python 2.7 with ArcGIS 10.5 Desktop and Python 3.6 with ArcGIS Pro. A few weeks back, I tried to install Anaconda (w/ Conda, Spyder, Jupyter, etc..) and it somehow overwrote my system settings for Python 2.7 (as well as pip). I noticed that I could no longer use pip or import stuff in 2.7. I uninstalled Anaconda and the updated version of pip (it somehow updated the pip version) and everything in 2.7 worked again. Any suggestions on reinstalling Anaconda without wrecking my Python 2.7 development environment again?

  • 1
    this is more of a stack overflow question related directly to multiple Python installations on a single machine.stackoverflow.com/questions/4583367/… – NULL.Dude Aug 13 '18 at 19:13
  • 1
    When you install Anaconda, the installer asks if you want to add Anaconda python to your path/make it default, uncheck this. However, you don'nt need to install another anaconda, ArcGIS Pro include the conda package manager. – user2856 Aug 13 '18 at 21:57
2

You could try installing through the Python Package Manger in ArcGIS Pro. Go to Project, Python, and Add Packages. You will find anaconda there as an option.

The Python Package Manger

An alternative option would be to use the conda package manager to get the packages of your choice. ArcGIS Pro 1.3 and greater ship with conda installed. This way you won't be mixing your pip and conda packages, and the conda installs will only be associated with Pro. You will find that some of the packages you mentioned will require the others as dependencies, and you will probably get all the packages you want rather quickly, even without the full anaconda distribution. I use the packages you mentioned, downloaded using conda for 3.6 with Pro, and it didn't affect my Desktop license or Python 2.7.

Here is another useful link that talks about conda as it relates to ArcGIS Pro.

Understanding Conda

I remember having issues with pip, but haven't had any issues since I started managing my packages with conda. Hope that helps.

  • I quickly realized that ArcGIS Pro comes with Coda package manager and I was able to install the arcgis package. What I didn't realize is that the version running in my arcgispro-py3 environment is 3.5.4. I installed Anaconda 3.6. Now when I try to run >import arcgis I get the error: ModuleNotFoundError. The Anaconda/Continuum documentation says to run >conda install python=3.5 , but in what path? If I just go to my user directory and run >python --version, in the Anaconda command prompt, it says python 3.6.5. Very confusing! – gwydion93 Aug 14 '18 at 14:09
  • 1
    Did you install arcgis using the following at prompt- conda install -c esri arcgis? That is the correct code, and should upgrade your python for Pro. I would say check your environmental paths because you may be trying to import the arcgis package with the python environment that it's not associated with (ie. not Pro). It would be safe to navigate to conda in the ArcGIS > Pro directory using cmd, and then type the conda install. Prior to Pro 2.2, the packages (including conda), are usually held at C:\Program Files\ArcGIS\Pro\bin\Python\Scripts. After 2.2- Python\envs\arcgispro-py3 – Pdavis327 Aug 14 '18 at 14:36
  • OK, so I ran the >conda install -c esri arcgis command from C:\Program Files\ArcGIS\Pro\bin\Python\Scripts. looked fine. I then ran >python --version and its showing Python 2.7.12! What the heck. I've been using 2.7, but now I need to use 3.5.4 with Anaconda. How do I fix that? – gwydion93 Aug 14 '18 at 14:51
  • In cmd. navaigate to C:\Program Files\ArcGIS\Pro\bin\Python then type python. Python should start at 3.5.4. Then type import arcgis. Does that work? If it does, you need to modify your environmental paths. – Pdavis327 Aug 14 '18 at 15:11
  • Nope. Still running in version 2.7 in C:\Program Files\ArcGIS\Pro\bin\Python. How can I switch versions (I am running in Windows, so I can't do alias)? – gwydion93 Aug 14 '18 at 15:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.