Anaconda Navigator installed OK. Jupyter Notebook Launch from Navigator and Terminal ("Jupyter-notebook") gets syntax errors. Also from Terminal ("conda install -c esri arcgis") gets syntax errors. Is the problem with latest OSX update 10.12.5?
Can you paste your error message? It would be easier to see what is going on.
As to support for OSX 10.12.5, my Mac runs this version and I do not have any issues.
Hi Atma, Here are my error messages. Any help appreciated!
For Jupyter Notebook:
Larrys-Mac-mini-3:~ lspear$ jupyter notebook
Traceback (most recent call last):
File "/Users/lspear/anaconda/bin/jupyter-notebook", line 6, in
import pygments
File "/Applications/QGIS.app/Contents/Resources/python/pygments/__init__.py", line 46
except TypeError, err:
^
SyntaxError: invalid syntax
For arcgis:
Larrys-Mac-mini-3:~ lspear$ conda install -c esri arcgis
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment /Users/lspear/anaconda:
The following NEW packages will be INSTALLED:
arcgis: 1.2.0-py36_1 esri
Proceed (/n)? y
Uninstalling prior versions of arcgis widget
File "/Users/lspear/anaconda/bin/jupyter-nbextension", line 6, in
Non-degree Student URL: http://www.unm.edu/~lspear
University of New Mexico
Albuquerque, New Mexico 87131
Hi Atma, My earlier reply was from email. Here is another with just specific errors.
File "/Applications/QGIS.app/Contents/Resources/python/pygments/__init__.py", line 46 except TypeError, err: ^SyntaxError: invalid syntax
For ArcGIS:
Could QGIS installed on this Mac be an issue?
Does the error here stem from pygments library installed with QGIS? One way to isolate this is to install and use the ArcGIS API in a new conda environment. I would recommend this as long as you do not have to use both QGIS and ArcGIS in the same python environment.
Atma, This is strange as I also installed Anaconda and the ArcGIS Python API on my two old Linux-Ubuntu computers
the same day and both have QGIS and work OK. I rarely use my Mac and am also new to Anaconda so not sure yet
how to run in different conda environment ( I will look this up). One possibility is to just remove QGIS on the Mac as I
also have it on PCs and Linux computers. However, I only have one Mac. Any further suggestions would be helpful.
--Thanks!
Atma, Just created a new conda environment and tried install for arcgis python api and startng jupyter notebook.
Both failed with the same error message as before. If no further suggestions I will wait awhile before removing
QGIS to see what happens.
Can you run `conda list` from your newly created env and paste the result? That will help me figure out if you have just the arcgis library or any other libraries that might interfere. Also can you paste the full error message you get when start the notebook
Atma, This are results for conda list and jupyter notebook from new environment (gisdev):
Larrys-Mac-mini-3:~ lspear$ source activate gisdev(gisdev) Larrys-Mac-mini-3:~ lspear$ conda list# packages in environment at /Users/lspear/anaconda/envs/gisdev:#
(gisdev) Larrys-Mac-mini-3:~ lspear$
(gisdev) Larrys-Mac-mini-3:~ lspear$ jupyter notebookTraceback (most recent call last): File "/Users/lspear/anaconda/bin/jupyter-notebook", line 6, in <module> sys.exit(notebook.notebookapp.main()) File "/Users/lspear/anaconda/lib/python3.6/site-packages/jupyter_core/application.py", line 267, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File "/Users/lspear/anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance app.initialize(argv) File "<decorator-gen-7>", line 2, in initialize File "/Users/lspear/anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "/Users/lspear/anaconda/lib/python3.6/site-packages/notebook/notebookapp.py", line 1290, in initialize super(NotebookApp, self).initialize(argv) File "<decorator-gen-6>", line 2, in initialize File "/Users/lspear/anaconda/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "/Users/lspear/anaconda/lib/python3.6/site-packages/jupyter_core/application.py", line 243, in initialize self.migrate_config() File "/Users/lspear/anaconda/lib/python3.6/site-packages/jupyter_core/application.py", line 162, in migrate_config from .migrate import get_ipython_dir, migrate File "/Users/lspear/anaconda/lib/python3.6/site-packages/jupyter_core/migrate.py", line 35, in <module> from IPython.paths import get_ipython_dir File "/Users/lspear/anaconda/lib/python3.6/site-packages/IPython/__init__.py", line 48, in <module> from .core.application import Application File "/Users/lspear/anaconda/lib/python3.6/site-packages/IPython/core/application.py", line 25, in <module> from IPython.core import release, crashhandler File "/Users/lspear/anaconda/lib/python3.6/site-packages/IPython/core/crashhandler.py", line 28, in <module> from IPython.core import ultratb File "/Users/lspear/anaconda/lib/python3.6/site-packages/IPython/core/ultratb.py", line 119, in <module> from IPython.core import debugger File "/Users/lspear/anaconda/lib/python3.6/site-packages/IPython/core/debugger.py", line 37, in <module> from IPython.utils import PyColorize, ulinecache File "/Users/lspear/anaconda/lib/python3.6/site-packages/IPython/utils/PyColorize.py", line 57, in <module> from .colorable import Colorable File "/Users/lspear/anaconda/lib/python3.6/site-packages/IPython/utils/colorable.py", line 13, in <module> import pygments File "/Applications/QGIS.app/Contents/Resources/python/pygments/__init__.py", line 46 except TypeError, err: ^SyntaxError: invalid syntax(gisdev) Larrys-Mac-mini-3:~ lspear$
I am afraid your conda env is not correct. For instance, when I run this, I get the following:
<SPAN class="punctuation token">(</SPAN>arcgis_v12b<SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">~</SPAN><SPAN class="operator token">/</SPAN>Documents<SPAN class="operator token">/</SPAN>code<SPAN class="operator token">/</SPAN>geosaurus<SPAN class="operator token">/</SPAN>geosaurus <SPAN class="punctuation token">[</SPAN>create_replica_fix<SPAN class="punctuation token">]</SPAN> $ conda list <SPAN class="comment token"># packages in environment at /Users/atma6951/anaconda/envs/arcgis_v12b:</SPAN> <SPAN class="comment token">#</SPAN> appnope <SPAN class="number token">0.1</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 arcgis <SPAN class="number token">1.2</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_1 esri bleach <SPAN class="number token">1.5</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 decorator <SPAN class="number token">4.0</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">11</SPAN> py35_0 entrypoints <SPAN class="number token">0.2</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">3</SPAN> py35_0 html5lib <SPAN class="number token">0.999</SPAN> py35_0 ipykernel <SPAN class="number token">4.6</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_0 ipython <SPAN class="number token">6.1</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 ipython_genutils <SPAN class="number token">0.2</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 ipywidgets <SPAN class="number token">6.0</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 jedi <SPAN class="number token">0.10</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">2</SPAN> py35_2 jinja2 <SPAN class="number token">2.9</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">6</SPAN> py35_0 jsonschema <SPAN class="number token">2.6</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 jupyter_client <SPAN class="number token">5.1</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 jupyter_core <SPAN class="number token">4.3</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 markupsafe <SPAN class="number token">0.23</SPAN> py35_2 mistune <SPAN class="number token">0.7</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">4</SPAN> py35_0 mkl <SPAN class="number token">2017.0</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">3</SPAN> <SPAN class="number token">0</SPAN> nbconvert <SPAN class="number token">5.2</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_0 nbformat <SPAN class="number token">4.3</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 notebook <SPAN class="number token">5.0</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 numpy <SPAN class="number token">1.13</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_0 openssl <SPAN class="number token">1.0</SPAN><SPAN class="punctuation token">.</SPAN>2l <SPAN class="number token">0</SPAN> pandas <SPAN class="number token">0.20</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">2</SPAN> np113py35_0 pandocfilters <SPAN class="number token">1.4</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_0 path<SPAN class="punctuation token">.</SPAN>py <SPAN class="number token">10.3</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_0 pexpect <SPAN class="number token">4.2</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_0 pickleshare <SPAN class="number token">0.7</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">4</SPAN> py35_0 pip <SPAN class="number token">9.0</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_1 prompt_toolkit <SPAN class="number token">1.0</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">14</SPAN> py35_0 ptyprocess <SPAN class="number token">0.5</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_0 pygments <SPAN class="number token">2.2</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 python <SPAN class="number token">3.5</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">3</SPAN> <SPAN class="number token">1</SPAN> python<SPAN class="operator token">-</SPAN>dateutil <SPAN class="number token">2.6</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 pytz <SPAN class="number token">2017.2</SPAN> py35_0 pyzmq <SPAN class="number token">16.0</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">2</SPAN> py35_0 readline <SPAN class="number token">6.2</SPAN> <SPAN class="number token">2</SPAN> setuptools <SPAN class="number token">27.2</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 simplegeneric <SPAN class="number token">0.8</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_1 six <SPAN class="number token">1.10</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 sqlite <SPAN class="number token">3.13</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> <SPAN class="number token">0</SPAN> terminado <SPAN class="number token">0.6</SPAN> py35_0 testpath <SPAN class="number token">0.3</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_0 tk <SPAN class="number token">8.5</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">18</SPAN> <SPAN class="number token">0</SPAN> tornado <SPAN class="number token">4.5</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">1</SPAN> py35_0 traitlets <SPAN class="number token">4.3</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">2</SPAN> py35_0 wcwidth <SPAN class="number token">0.1</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">7</SPAN> py35_0 wheel <SPAN class="number token">0.29</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 widgetsnbextension <SPAN class="number token">2.0</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">0</SPAN> py35_0 xz <SPAN class="number token">5.2</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">2</SPAN> <SPAN class="number token">1</SPAN> zlib <SPAN class="number token">1.2</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="number token">8</SPAN> <SPAN class="number token">3</SPAN> <SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
I expect to see something like above if you installed the arcgis package in that environment. In your case the list is empty. At this point, I would recommend reinstalling anaconda and the ArcGIS package.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.