HOW TO

Modify the Python installation to work with custom built C extensions for use with ArcMap.exe

Last Published: April 25, 2020

Summary

The following information is specific to any Python developers who have installed a third-party Python module through any of the following:
-setup.py install
-easy_install
-pip install
The Python build process for C extensions in distutils strips the Visual C++ Runtime dependency from its embedded manifest. Since ArcMap.exe works as a side-by-side application, the interaction between the two fail to find the MSVC runtime DLL, which causes the module to fail on import.

Procedure

The C extensions that are built manually do not work with ArcMap.exe, but do work with Python.exe.

Note:
This applies only to the extensions that are built manually from 2.6.5 and includes .pyd files as part of their install. There are no problems with pure Python code or anything built on 2.6.2.

  1. Backup the msvc9compiler.py file found at C:\Python26\Lib\distutils\ to a known location.
  2. Overwrite the msvc9compiler.py (version 2.6.2) with the version available here (msvc9compiler.py).

Article ID:000010913

Software:
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic