How do you know when I upgrade Pro to a new version? I post a new thread on creating a clone...
I tried to clone the default to my 'clones' directory and that fails. I try to clone the default using the ArcGIS Pro path, and that fails.
I try to do a conda install in the default env of spyder and that fails
I try to do a pip install of spyder in the default env and that fails.
Oh my... This sounds more like a rant than a question...
Good thing it's Friday.
I'm not cloning my clone: That screen cap shows that when I use ArcGIS Pro to clone the default it fails. I've got that page open already and trying to create one with conda...
Well... couldn't wait
(arcgispro-py3) C:\arc_pro\bin\Python\envs\arcgispro-py3>conda update spyder --dry-run
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\arc_pro\bin\Python\envs\arcgispro-py3
added / updated specs:
- spyder
The following packages will be downloaded:
package | build
---------------------------|-----------------
astroid-2.5.8 | py37haa95532_0 302 KB
decorator-4.4.2 | pyhd3eb1b0_0 12 KB
jupyterlab_pygments-0.1.1 | py_1 7 KB esri
nbclient-0.5.0 | py_0 59 KB esri
nest-asyncio-1.3.2 | py_0 7 KB esri
pip-21.1.2 | py37haa95532_0 1.8 MB
pylint-2.8.3 | py37haa95532_1 482 KB
qtconsole-5.1.0 | pyhd3eb1b0_0 98 KB
spyder-5.0.3 | py37haa95532_1 5.5 MB
spyder-kernels-2.0.3 | py37haa95532_0 107 KB
typing-extensions-3.7.4.3 | hd3eb1b0_0 12 KB
typing_extensions-3.7.4.3 | pyh06a4308_0 28 KB
------------------------------------------------------------
Total: 8.4 MB
The following NEW packages will be INSTALLED:
async_generator pkgs/main/win-64::async_generator-1.10-py37h28b3542_0
jupyterlab_pygmen~ esri/noarch::jupyterlab_pygments-0.1.1-py_1
nbclient esri/noarch::nbclient-0.5.0-py_0
nest-asyncio esri/noarch::nest-asyncio-1.3.2-py_0
typing-extensions pkgs/main/noarch::typing-extensions-3.7.4.3-hd3eb1b0_0
The following packages will be UPDATED:
astroid 2.5-py37haa95532_1 --> 2.5.8-py37haa95532_0
pip 21.1.1-py37haa95532_0 --> 21.1.2-py37haa95532_0
pylint 2.7.4-py37haa95532_1 --> 2.8.3-py37haa95532_1
qtconsole 5.0.3-pyhd3eb1b0_0 --> 5.1.0-pyhd3eb1b0_0
spyder 5.0.0-py37haa95532_1 --> 5.0.3-py37haa95532_1
spyder-kernels 2.0.1-py37haa95532_0 --> 2.0.3-py37haa95532_0
The following packages will be DOWNGRADED:
decorator 5.0.9-pyhd3eb1b0_0 --> 4.4.2-pyhd3eb1b0_0
typing_extensions 3.7.4.3-pyha847dfd_0 --> 3.7.4.3-pyh06a4308_0Of course, I didn't "clone", I installed in base.
I've tried this several times to no avail:
(arcgispro-py3) C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3>conda install spyder
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/esri/win-64/current_repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https://conda.anaconda.org/esri/win-64'
I can't update what isn't installed already.
I think they left a bunch of files out of the conda installation. I was not able to get it to work correctly from a bash shell environment, it forced me to run "conda init bash" which installed lines in .bash_profile that were hopelessly broken. I installed Miniconda and got that to work from the shell. It is the same version (3.92) but I was able to get it working.
In that funky environment manager in Pro 2.8 I have the one working environment and all the ones I built showing "broken" like yours. I was able to clone arcgispro-py3. On my first try I used the "Clone Default" but that failed. I deleted the broken folder from the command line then tried again from the box over there on the right next to "arcgispro-py3". That worked.
I was able to successfully delete one of my "broken" ones from their GUI. What I really want is to fix them.
I tried running update, for example "conda update -n arcgispro27-vscode --all". Running it once was not enough... for kicks I ran it a second time and it found more stuff to do. I have no idea if that's normal. On the second try it actually tried to help me, it said
The version of the binaries in the active Python environment do
not match the version of the binaries of the ArcGIS Pro application.
Active environment version : 2.7
arcgispro-py3 environment version : 2.8
To create a new environment that is up to date with arcgispro-py3:
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
2. Create a new environment by cloning arcgispro-py3, and activate it:
> conda create --clone arcgispro-py3 --name my-env --pinned
> activate my-env
3. Add back missing conda packages from your current environment:
> conda env update -n my-env -f env.yaml
4. (Optional) Add back missing packages from pip:
> pip install -r requirements.txt
5. (Optional) Make it the default for the ArcGIS Pro application and the
"Python Command Prompt":
> proswap my-env
I'm going to ponder that now. It's not 5pm yet and what a fun Friday task this is!
That process worked to get an old environment working.
Basically what they are saying is,
1 dump the lists of packages from the old environment,
2 clone the latest 2.8 one
3 throw the list(s) of old packages at the clone using update
I did not try to filter out and select the packages that I added, I just threw the whole list at it and let it decide, and it worked. I did not try the "pip" steps because I generally avoid pip and use only conda.
There is no "pinned" option on the "conda create" command so I skipped that.
Then I went into ArcPro and selected the new no longer broken environment and opened a Python window and did "import arcpy". Looks like it worked.
This is an aside, but really, stop using Spyder, use Visual Studio Code. I am a diehard Linux/Open Source guy but VSCode is far and away better than Spyder even though it comes from Microsoft. I could write a book on why it's better. I won't because I want to upgrade my conda environments instead, before 5. 🙂 I used Spyder for about a year before someone told me the same thing.
I had the opposite experience 😁 ... but alas, opinions are just pi onions to others
conda install spyder=5.0.3 --no-pindidn't work?
I did a clone inside Pro and then activated it from the command line using my functioning Miniconda version of conda and then did a plain "conda install spyder" and it worked. I launched it but did not try it out, I might like it and have to stop promoting VSCode.
VS code is an option. The bigger issue to me is the functionality or lack there of on the part of version updates and Python environments. With luck this is my last full version upgrade because I: