Installation question

4085
7
Jump to solution
12-22-2016 10:23 PM
deleted-user-9zlChDJzM-SF
New Contributor III

I have installed conda on my computer and have been able to successfully open the jupyter notebook. However, when I attempt to test it as instructed in the guide. I can't create a Python3 notebook, the only options are Python Default and Python Conda. And the following test code does nothing in either.

from arcgis.gis import GIS my_gis = GIS() my_gis.map()
Have I done something wrong in the install or is there another step that I am missing? 
I am using 64bit Windows. 
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
deleted-user-9zlChDJzM-SF
New Contributor III

So I finally got this figured out. Apparently when initiating jupyter notebook in the command prompt. It defaults to using port 8888. When I initiated it through port 8889 with the command 'jupyter notebook --port=8889' it came up and I was actually able to execute the code.

View solution in original post

7 Replies
JayantaPoddar
MVP Esteemed Contributor

Just a cross-check if you have installed Anaconda for Python 3.5. https://www.continuum.io/downloads

Go to Anaconda Command Prompt, and type "python"... What version is it?



Think Location
RohitSingh2
Esri Contributor

It's OK to see only Python [conda root] and Python [default]. I recently installed the Jupyter Notebook v 4.2.3 and this is how the Python kernels show up.

The first time you try to create a map, it may take a little long as it's loading the Javascript files for the first time and they're not coming from the browser cache. It's usually much faster after that.

Jupyter Notebook should be restarted if it's already running when the ArcGIS Python API is installed.

Can you retry creating the map in another notebook, and see if the map comes up in in say about 30-40 seconds. If not, can you open the JavaScript console in your browser, and see if any erorrs are reported there? Another thing to check would be the Network tab and see if any of the files are getting an error in loading. If there are any errors, please report them here.

Also, post the output of the following command:

jupyter nbextension list

On my system the output is as follows:

C:\Users\rohit>jupyter nbextension list
Known nbextensions:
config dir: C:\Users\rohit\Anaconda3\etc\jupyter\nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: ok
nb_conda/main enabled
- Validating: ok
nb_anacondacloud/main enabled
- Validating: ok
arcgis/mapview enabled
- Validating: ok
nbpresent/js/nbpresent.min enabled
- Validating: ok
tree section
nb_conda/tree enabled
- Validating: ok

deleted-user-9zlChDJzM-SF
New Contributor III

Left it open for 10 mins with nothing happening.

Tried running the command you suggested. Here is what got:

0 Kudos
RohitSingh2
Esri Contributor

Hi Shawn, 

Thanks for posting this. 

arcgis/mapview extension is missing from your list, hence the widget isnt working for you.

Can you remove and reinstall the arcgis package and send the output of the install command. The installation of the arcgis package installs the widget as the last step.

Uninstall using:

conda uninstall arcgis

Then, reinstall using:

conda install -c esri arcgis

Post the complete output of the install command.

Thanks,

Rohit

deleted-user-9zlChDJzM-SF
New Contributor III

Reinstalled and am showing arcgis/mapview now. However, it did not seem to have an effect on being able to bring up the map in jupyter notebook.

I do notice that this message keeps appearing in the command window after trying to execute the map code.

0 Kudos
RohitSingh2
Esri Contributor

Thanks for reinstalling and posting the output. From the install output, it looks like the arcgis/mapview widget installed correctly. Can you confirm this by running:

jupyter nbextension list

and see if it contains the 'arcgis/mapview' widget?

I looked up the other message 'zmq message arrived on closed channel' error that you're getting, and from the posts at Google Groups it looks like your anti-virus maybe blocking jupyter notebook and causing cells to not execute. It may also be leading to the problems with the map widget not installing correctly or showing up.

If it still doesn't show up, here is a workaround that may help you get past the problem, though I'm not sure why the widget installation seems to complete successfully but doesnt add it to the notebook extension list. Run the following command to install the notebook widget in your user profile:

python -m arcgis.install 

Then retry the steps to load the map in your notebook. Also, can you check if the notebook cells are executing by typing 1+2 in a cell, executing it and seeing if it results in an output of 3.

0 Kudos
deleted-user-9zlChDJzM-SF
New Contributor III

So I finally got this figured out. Apparently when initiating jupyter notebook in the command prompt. It defaults to using port 8888. When I initiated it through port 8889 with the command 'jupyter notebook --port=8889' it came up and I was actually able to execute the code.