Select to view content in your preferred language

arcpy version mismatch causing problems

57
3
4 hours ago
Labels (1)
JoelWill
New Member

Issue started when trying to use "Geotagged Photos to Points" tool which is just a python script. When opening the tool I get the error 

initializeParameters Error: Traceback (most recent call last):
File "c:\program files\arcgis\pro\Resources\ArcToolbox\toolboxes\Data Management Tools.tbx\GeoTaggedPhotosToPoints.tool\tool.script.validate.py", line 1, in <module>
import arcpy
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\__init__.py", line 77, in <module>
from arcpy.geoprocessing import gp
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from ._base import *
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 14, in <module>
import arcgisscripting
File "C:\Users\JoWill\AppData\Local\Programs\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgisscripting\__init__.py", line 115, in <module>
raise ImportError("version mis-match") from None
ImportError: version mis-match

After some investigation i found that if i open a python window and try to run the "import arcpy" command I get the error:

The version of the binaries in the active Python environment do
not match the version of the binaries in the ArcGIS application.

Active environment version : 3.5
arcgispro-py3 environment version : 3.3

To update the existing environment see the conda proup subcommand
> conda proup --help

To manually create a new environment for use with the current ArcGIS application:
1. Generate a list of additional packages installed in your current environment,
with the conda command:
> conda env export > env.yaml
2. (Optional) If you have additional dependencies installed through pip,
find those with pip freeze:
> pip freeze > requirements.txt
3. Create a new environment by cloning arcgispro-py3, and activate it:
> conda create --clone arcgispro-py3 --name my-env --pinned
> activate my-env
4. Add back missing conda packages from your current environment:
> conda env update -n my-env -f env.yaml
5. (Optional) Add back missing packages from pip:
> pip install -r requirements.txt
6. (Optional) Make it the default for the ArcGIS application and the
"Python Command Prompt":
> proswap my-env

I am unable to run any of the commands listed in this output. Any conda command i try to run just gives me a syntax error. Im very confused as to whats going on. 

Heres a screenshot of my Package manager screen if that helps. 

Im using version 3.3.4 of ArcGIS Pro

 

Tags (2)
0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

I doubt if a soft reset is going to fix anything, but if you want to completely reinstall Pro then follow

How To: Perform a Clean Uninstall and Reinstall of ArcGIS Pro


... sort of retired...
0 Kudos
JoelWill
New Member

I would like to try that however our software is managed by IT and unfortunately getting someone on the phone to go through the install will take ages

0 Kudos
DanPatterson
MVP Esteemed Contributor

get a list of the environments on your maching, then remove anything that isn't arcgispro-pye

conda env list
conda env remove --name whatever_the_env_name_is

Then clone arcgispro-py3 as per the instructions

 


... sort of retired...
0 Kudos