Anaconda 2.7 64位安装故障求助:疑与ArcGIS 10.5自带Python冲突
Hey there, this is a super common clash between ArcGIS and Anaconda—ArcGIS 10.5 locks you into its own 32-bit Python 2.7 environment, and trying to overwrite that default with a 64-bit Anaconda build causes all sorts of headaches. Let’s walk through how to resolve this:
1. Don’t set Anaconda as your default Python during installation
First rule: skip the "Register Anaconda as my default Python 2.7" option when you run the installer. ArcGIS relies entirely on its own 32-bit Python setup, and overwriting the default will break ArcGIS tooling, plus the 32/64-bit mismatch adds another layer of conflict. This is almost certainly contributing to your installation errors.
2. Manually manage your two Python environments
Once installed, you’ll have two separate Python setups—treat them like distinct tools:
- ArcGIS Python:
C:\Python27\ArcGIS10.5\python.exe(32-bit, for all ArcGIS scripting) - Anaconda Python:
C:\Users\aneme\Anaconda2\python.exe(64-bit, for your data science work)
To use Anaconda, either:
- Call its executable directly (e.g.,
C:\Users\aneme\Anaconda2\python.exe my_script.py) - Use the Anaconda Prompt shortcut that gets installed—it automatically activates the Anaconda environment so all commands use its Python and packages.
3. Clean up your system PATH to avoid accidental conflicts
- Open your system environment variables (search "Edit the system environment variables" in Windows)
- Check the
Pathvariable: Make sure ArcGIS’s Python paths (likeC:\Python27\ArcGIS10.5andC:\Python27\ArcGIS10.5\Scripts) are listed if you need ArcGIS to work properly, but don’t let Anaconda’s paths overwrite them at the top. You can keep both, just know that the first one in the list gets priority when you typepythonin a regular command prompt. - Delete any
PYTHONPATHenvironment variable if it exists—it can accidentally mix site-packages from ArcGIS and Anaconda, causing import errors.
4. Fix a failed installation (clean slate approach)
If you’ve already tried reinstalling and still get errors, do a full clean:
- Uninstall Anaconda via Control Panel
- Delete the
C:\Users\aneme\Anaconda2folder completely - Remove any Anaconda-related entries from your system
Path - Delete the
.condarcfile in your user directory (C:\Users\your_username\.condarc) - Restart your computer, then run the Anaconda installer as administrator (right-click > Run as administrator) and make sure to uncheck the "Register as default Python" option.
5. Verify both environments work
- Test ArcGIS: Open ArcMap, open the Python window, and run
import arcpy—it should load without errors. - Test Anaconda: Open Anaconda Prompt, run
python --version—it should show 2.7.x 64-bit, andconda listshould load your Anaconda packages.
内容的提问来源于stack exchange,提问作者Thor

