Unable to install or upgrade any packages using conda. I have tried in the Python environment Upgrade dialog within ArcGIS Pro. Click on the Upgrade button and it thinks for a while and nothing happens.
I next tried via the command line:
(zzz) C:\Users\PC\AppData\Local\ESRI\conda\envs\zzz>conda install arcgis
Fetching package metadata .............
Solving package specifications:
InvalidSpecError: Invalid spec: >=
I am using a cloned environment and have tried many different combinations on the command line including -c esri, --no-pin, --dry-run etc. It always comes back with the same error as above. It also doesn't matter what package I try and install or upgrade either. Using Pro 2.7.2
I have also come across an issue in the conda github showing the same thing:
https://stackoverflow.com/questions/60757142/conda-update-invalidspecerror
Can anyone else confirm they are having the same issue?
Solved! Go to Solution.
And now it appears to be resolved. Uninstalled ArcGIS Pro completely. Deleted the folder: C:\Users\<USERNAME>\AppData\Local\ESRI\
Fresh new install of ArcGIS Pro 2.7. Applied 2.7.3 patch. Installed Deep Learning Framework from github installer. Cloned the default environment and in the Python command prompt ran: conda install arcgis
Installed successfully, no errors occurred. conda list shows arcgis 1.8.5 installed. Successfully trained and inferenced one of my models so all seems to be working now.
(arcgispro-py3-clone) E:\deep_learning_esri\change_detection>conda list
# packages in environment at C:\Users\<USERNAME>\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone:
#
_tflow_select 2.1.0 gpu
absl-py 0.11.0 py37haa95532_0
aiohttp 3.6.3 py37he774522_0
appdirs 1.4.4 py_0
arcgis 1.8.5 py37_1783 esri
arcgispro 2.7 0 esri
arcpy 2.7 py37_arcgispro_26810 [arcgispro] esri
.....
There has been a bit of recent activity in the esri anaconda repo, so I suspect there was something amiss with the packages there which has now been resolved.
conda 4.0 MB win-64/arcgis-1.8.5-py38_1783.tar.bz2 23 hours and 37 minutes ago
conda 4.2 MB win-64/arcgis-1.8.5-py37_1783.tar.bz2 23 hours and 38 minutes ago
conda 4.0 MB win-64/arcgis-1.8.5-py36_1783.tar.bz2 23 hours and 38 minutes ago
Do you have full administrative rights to your computer? (got to ask)
did you try >>> conda install arcgis=1.8.4
the above with -c esri added
When you say "any" package, then you have a much larger issue.
The only time I saw that error message it had 2.7 at the end
InvalidSpecError: Invalid spec: >= 2.7
I wiped anything esri from the registry, c:\users and my main install folder (I don't use c:\Program.... etc)
and reinstalled Pro from the *.msi
never had the issue after and never figured out why but a good house clean worked.
As for "any" package, do you have a list?
@DanPatterson Yes, full admin rights, standalone laptop not connected to corporate network, and working from home on my own internet connection.
I have narrowed down the problem somewhat. Uninstalled ArcGIS Pro, removed all esri folders under the users directory and any registry keys I could find. Fresh clean install of ArcGIS Pro 2.7.2. I can successfully clone the default python environment, use the python command window, do a conda install arcgis --dry-run and I get a list of packages to install. Then do it without the --dry-run and I get arcgis 1.8.5 installed and working.
Then I delete the cloned environment, and install the deep learning framework from the installer provided by esri on the github site. Now when I clone the default environment again, and run the same conda command as before, I get the InvalidSpecError. At this point conda just seems broken - no matter what command line options or package I try and use, the same error just keeps coming up.
And I put the wrong link in my original message - here is the one with someone getting the same error, in slightly different circumstances, but also using ArcGIS Pro:
So this
And you might want to start an Issue on the github site, since I can't see anything obvious
Looks like someone else has the same issue as me:
And now it appears to be resolved. Uninstalled ArcGIS Pro completely. Deleted the folder: C:\Users\<USERNAME>\AppData\Local\ESRI\
Fresh new install of ArcGIS Pro 2.7. Applied 2.7.3 patch. Installed Deep Learning Framework from github installer. Cloned the default environment and in the Python command prompt ran: conda install arcgis
Installed successfully, no errors occurred. conda list shows arcgis 1.8.5 installed. Successfully trained and inferenced one of my models so all seems to be working now.
(arcgispro-py3-clone) E:\deep_learning_esri\change_detection>conda list
# packages in environment at C:\Users\<USERNAME>\AppData\Local\ESRI\conda\envs\arcgispro-py3-clone:
#
_tflow_select 2.1.0 gpu
absl-py 0.11.0 py37haa95532_0
aiohttp 3.6.3 py37he774522_0
appdirs 1.4.4 py_0
arcgis 1.8.5 py37_1783 esri
arcgispro 2.7 0 esri
arcpy 2.7 py37_arcgispro_26810 [arcgispro] esri
.....
There has been a bit of recent activity in the esri anaconda repo, so I suspect there was something amiss with the packages there which has now been resolved.
conda 4.0 MB win-64/arcgis-1.8.5-py38_1783.tar.bz2 23 hours and 37 minutes ago
conda 4.2 MB win-64/arcgis-1.8.5-py37_1783.tar.bz2 23 hours and 38 minutes ago
conda 4.0 MB win-64/arcgis-1.8.5-py36_1783.tar.bz2 23 hours and 38 minutes ago
I'm going to file a separate issue to support; however, I'm getting a "InvalidSpecError: Invalid spec: =2.7" error even after full ArcGIS Pro uninstall/clean and rebuild of the environment.
I consistently get this error when running: conda install -c conda-forge deepdiff
We've been running scripts using that package for a couple of years without any issues on older ArcGIS Pro installs.
conda --version is 4.3.27 on a ArcGIS Pro 2.7.3 managed environment.
I installed Miniconda3 after this and built up a arcgis/ArcPy environment there. I'm able to install that deepdiff package and run scripts with that environment without any issues:
In that Miniconda3 environment, conda --version is 4.9.2.