If you have to clone your environment and want to get spyder running and don't want the console window drifting around on your desktop all dark and dreary... you can create a shortcut as
Now... lets break it down
- C:\ArcGISPro\ Where I installed ArcGIS Pro (currently 2.3)
- C:\ArcGISPro\arcgispro-py3-dan\ Where I put my clone
- C:\ArcGISPro\bin\Python\ Where pythonw.exe is installed by esri
So all you need to do is change the install folder for ArcGIS Pro if it needs to be installed somewhere else.
The rule is
- Drive:\Esri_Install_Folder\bin\Python esri's install location
- Drive:\Your_clone_folder\ Your folder to find pythonw.exe
Don't if you can help it
- Install in folders with spaces... can't be helped sometimes, but install folders are sometimes an issue
- Try not to use the "Users" folder …. sometimes you don't have the option at work
--------- Some illustrations from the past, but I won't correct the paths ------------------------------------------------
Here are a few tips for creating desktop shortcuts to make working with Pro a tad easier.
Installation of packages is given in pictoral form at the end of the blog (I sort of forgot... )
I like to have stuff easily accessed. Desktop icons work for me. Here is an example of having the pro.bat, Spyder and Jupyter IDE icons created and organized in one spot.
Launch File Explorer and find your installation folder. In my case, I installed Pro in a folder with the same name. The rest of your folder structure will be the same after this point. Navigate to the jupyter-qtconsole-script.py script within the path (see 1 and 2 in the figure)
Once the properties dialog is open, click on Shortcut, then ensure your path emulates the example below. It consists of two parts... the first is the location of python.exe within the installation path... the second is the aforementioned script which is run and noted above. I make sure that the Start in: is specified as well.
If you work on your machine solely, you can click on the Advanced button in the previous dialog and toggle off the Run as administrator checkbox. This will just avoid you having to answer a security question when the shortcut is used.
And now you are done.
I created one for proenv.bat as well as Spyder for ArcGIS Pro since I use different versions of Spyder and python and separate conda distributions, so I keep different shortcuts.
Here are the equivalent options for the Spyder shortcut.
Target... (pythonw.exe location and the spyder-script.py location)