1

I have a couple of python installations on my windows 7 machine. I have the one that was installed by ArcGIS, in a folder called "ArcGISx6410.2", and another I recently installed myself directly from the python website, I've put that in a folder called "DirectDownload".

The one installed by ArcGIS is the default one which I normally use, and which the windows path points too. This is what I get when I call python from the command prompt:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

U:\>python
Python 2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)] on win 32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.executable
'C:\\Python27\\ArcGISx6410.2\\python.exe'

But, ArcGIS itself appears to call the "DirectDownload" installation, and that one doesn't contain numpy, and can therefore not import arcpy. I don't need the "DirectDownload" installation any more, but if I remove it (or rename it) then ArcGIS will not load at all, it will not get past the splash screen.

How can I tell ArcGIS to use it's own installation of python, like it was doing quite happily until I installed the other version?

  • 1
    This seems like a case when it's not worth the trouble trying to find out what's wrong and just reinstall ArcGIS. – Martin Oct 19 '15 at 10:26
1

Try to use registry change-

Go to computer\HKEY_LOCAL_MACHINE\SOFTWARE\PYTHON\PythonCore\2.7\InstallPath

see here

And change the path for DLL, Lib etc.

e.g.

My old setting was

C:\Python27\ArcGISx6410.3\Lib;C:\Python27\ArcGISx6410.3\DLLs;C:\Python27\ArcGISx6410.3\Lib\lib-tk

and my new setting is-

C:\Python27\ArcGIS10.3\Lib;C:\Python27\ArcGIS10.3\DLLs;C:\Python27\ArcGIS10.3\Lib\lib-tk
  • Have you got your solution! – SIslam Oct 19 '15 at 10:29
  • Thanks for the suggestion, but in Registry the install path for python is the ArcGIS one that I want already. – EddyTheB Oct 19 '15 at 10:59
  • Then locate where your shortcut of ide is located and change there like C:\Python27\ArcGISx6410.3\pythonw.exe "C:\Python27\ArcGISx6410.3\Lib\idlelib\idle.pyw" or C:\Python27\ArcGIS10.3\pythonw.exe "C:\Python27\ArcGIS10.3\Lib\idlelib\idle.pyw" – SIslam Oct 19 '15 at 11:24
1

Previous answers can certainly help in most cases and @Martins comment about reinstalling is true as well.

But in case that one doesn't want reinstall ArcGis (especially in development environments) since in some cases as long as you don't uninstall other python versions, there is a chance that the problem will insist.

After doing SIslam's steps, you can rename the folder of all other python installations temporarily (especially the same versions) and open arcmap and run a toolbox and arcmap will call the default python. this way you won't lose other versions of your python since you can rename them back.

0

You can change the default running python, from Environmental variables.

Go To My Computer > Properties > Advanced > Environment Variables

then select Path variable from User variables list and click edit, then change your Python folder from DirectDownload to the old folder you are interested in.

  • 2
    Thanks for your suggestion, but unfortunately the only reference to python in the Path variable is already to the old one; "C:\Python27\ArcGISx6410.2\". It looks like it's only ArcGIS that points to the new installation. – EddyTheB Oct 19 '15 at 10:22
0

ArcMap defaults to C:\Users\dayl\AppData\Local\Continuum after anaconda is installed.

Rename the Continuum fodler

C:\Users\dayl\AppData\Local\Continuum to C:\Users\dayl\AppData\Local\Continuumx

Now import arcpy should work.

Update your System Environment PATH

Since we renamed the Continuum folder we should update any paths that use it.

  1. Go to your System Properties
  2. Click the Advanced tab.
  3. Click Environment Variables.

In my case I had to update my conda path variable

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.