Frequently asked question
At Pro 3.2, Esri launched the Python embedded within Pro with the PYTHONNOUSERSITE option, this disables the importing of packages from the "user site packages" directory and avoids this class of problems. The PYTHONNOUSERSITE flag is only set in the ArcGIS Pro application. Standalone terminal sessions that run python.exe may still encounter problems. See the PYTHONNOUSERSITE documentation for command line options.
To ensure packages are installed in the environment rather than the user site packages directory, it is possible to add permissions to the active environment directory. This then allows read/write access for pip, and the user should then be able to work with all Python packages as usual.
Warning: The instructions below include making changes to essential parts of your operating system. It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult a qualified computer systems professional, if necessary.
Esri cannot guarantee results from incorrect modifications while following these instructions. Therefore, use caution and proceed at your own risk.
If it is desireable to return to the default Python behavior to use the "use site packages" option, and it is necessary to share pip packages across environments, opt out of the altered Pro 3.2 behavior by setting the registry key below.
Software\ESRI\ArcGISPro\Settings under the HKCU or HKLM as appropriate for your install typePythonAllowUserSitePackages1 means enable user site packagesArticle ID: 000031545
Get help from ArcGIS experts
Start chatting now