PROBLEM
Users are unable to import or load ArcPy in ArcMap with the installed version of Python.
There are several possible causes:
Note: Users can install different versions or bit versions of Python. As of version 10.1, ArcMap requires Python 2.7.x (32-bit). For more information, refer to the following article, FAQ: What version of Python is used in ArcGIS? Using a version of Python other than the version expected with ArcGIS can lead to compatibility issues.
Use one or all of the following solutions to resolve this issue.
Change the association of Python to use 32-bit Python
For more information, refer to the following FAQ: Why do Python scripts fail on a machine with both ArcGIS for Server and Desktop Installed?
Change the path to the python.exe file in the Windows Environment Variables Path variable
Add the path needed by modifying the .pth file
Repair the ArcGIS for Desktop installation
If using PythonWin:
Without ArcMap, the default installation path for PythonWin is:
C:\Python27\Lib\site-packages\pythonwin\Pythonwin.exe
Instead, PythonWin must be installed in the following path:
C:\Python27\ArcGIS10.x\Lib\site-packages\pythonwin\Pythonwin.exe
To ensure the correct default path is used during installation, uninstall PythonWin, follow Step 4 to repair ArcMap, and reinstall PythonWin.
Note: If users have ArcGIS for Server installed on the same machine, a 64-bit Python is also installed. This leads to the script calling the wrong bit version of Python. Users are unable to select the default installation path for PythonWin during installation. The steps to repair ArcMap are crucial to ensure the correct destination path.
Get help from ArcGIS experts
Download the Esri Support App