arcgis import returns errors when starting from Python prompt under Pro

494
1
08-01-2017 01:04 PM
LeileiDuan1
New Contributor III

Hi there,

I was able to use Python API fine with Pro 1.4 and Python API 1.2 version. I just updated Pro to 2.0 today, and found the import arcgis command returned errors:

The errors only showed up when opening Jupyter Notebook with the Python prompt under ArcGIS Pro; when I tried to open the same notebook with Anaconda prompt, everything worked well. I wonder why this is happening... I initially installed Python API through Pro.

Thanks a lot!

Best,

Leilei

Tags (1)
0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus

I have my jupyter shortcut installed on my desktop here...

C:\ArcPro\bin\Python\envs\arcgispro-py3\pythonw.exe "C:/ArcPro/bin/Python/envs/arcgispro-py3/Scripts/jupyter-notebook-script.py"

since I installed Pro in a C:\ArcPro folder, that part will differ in your installation but the rest will be the same.

Similarly, I use Spyder as my python IDE and it is likewise installed in a similar fashion

C:\ArcPro\bin\Python\envs\arcgispro-py3\pythonw.exe "C:/ArcPro/bin/Python/envs/arcgispro-py3/Scripts/spyder-script.py"

see my blog post on Creating Desktop shortcuts and

Jupyter Notebook setup for other information