Notebook: Can't get jupter to start

Created on 28 Mar 2017  ·  19Comments  ·  Source: jupyter/notebook

`` Traceback (most recent call last): File "/usr/bin/jupyter-notebook", line 3, in <module> from notebook.notebookapp import main File "/usr/lib/python3.6/site-packages/notebook/notebookapp.py", line 61, in <module> from .services.kernels.kernelmanager import MappingKernelManager File "/usr/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 16, in <module> from jupyter_client.multikernelmanager import MultiKernelManager File "/usr/lib/python3.6/site-packages/jupyter_client/__init__.py", line 7, in <module> from .manager import KernelManager, run_kernel File "/usr/lib/python3.6/site-packages/jupyter_client/manager.py", line 32, in <module> from .session import Session File "/usr/lib/python3.6/site-packages/jupyter_client/session.py", line 61, in <module> from jupyter_client.jsonutil import extract_dates, squash_dates, date_default File "/usr/lib/python3.6/site-packages/jupyter_client/jsonutil.py", line 11, in <module> from dateutil.parser import parse as _dateutil_parse File "/usr/lib/python3.6/site-packages/dateutil/parser.py", line 158 l.append("%s=%s" % (attr,value`))
^
SyntaxError: invalid syntax

I tried uninstalling and reinstalling

Needs Info Environment

Most helpful comment

Greetings I had the same issue and I solve it like the others specify, by upgrading the python-dateutil:

sudo -H pip install python-dateutil --upgrade

All 19 comments

What's pip list? Specifically python-dateutil?

Also make sure you are using pip >= 9.

I have the same issue:

Python v3.6, python-dateutil (1.5)

Dateutil 1.5 is for Python 2. Update it to a later version.

I'm marking this as no-action because I don't believe it's a bug in our code, but if you're getting python-dateutil 1.5 installed on Python 3, there is probably a problem with dependencies or packaging of something. Do you know what installation and setup steps you did that resulted in that state? If we have a way to reproduce it, we can start to figure out what is at fault for getting you an old version of the package.

I don't know how this happened.

My common python's version is 2.7. So I've installed python3 via brew and then installed jupyter via pip3 and now i see this error.

p.s. I've updated python-dateutil and it's ok now.

Greetings I had the same issue and I solve it like the others specify, by upgrading the python-dateutil:

sudo -H pip install python-dateutil --upgrade

Thank you! I had the same problem and upgrading dateutil solved the issue

Thank you! I had the same problem and upgrading dateutil solved the issue

Thank you!Solve it!

Greetings I had the same issue and I solve it like the others specify, by upgrading the python-dateutil:

sudo -H pip install python-dateutil --upgrade

it upgraded but I take the same error again :/

Try to remove python-dateutil first using the command: pip3 uninstall python-dateutil
After that install the last version by doing: pip3 install python-dateutil
Check the version of python-dateutil (2.8.1 at least) using the command: pip3 list
It should work now.

Thank you! I had the same problem and upgrading dateutil solved the issue

It worked for me too, thanks!
In my case, dateutil had been "retrograded" to 1.5 when I installed heroku 0.1.4 as it is not compatible with newer versions of dateutil. Maybe that information can help someone else

It worked for me too, thanks!
In my case, dateutil had been "retrograded" to 1.5 when I installed heroku 0.1.4 as it is not compatible with newer versions of dateutil. Maybe that information can help someone else

I think I fell in the same boat as you. Also with heroku, and also this solution worked out.

Greetings I had the same issue and I solve it like the others specify, by upgrading the python-dateutil:
sudo -H pip install python-dateutil --upgrade

it upgraded but I take the same error again :/

Had the same issue, it worked :D

I just did pip3 uninstall python-dateutil and run jupyter-lab and it worked.

Having the same issue:
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/jupyter", line 7, in
from jupyter_core.command import main
File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyter_core/__init__.py", line 1, in
from .version import version_info, __version__
File "/home/ubuntu/.local/lib/python3.5/site-packages/jupyter_core/version.py", line 21
_suffix_ = f'.dev{version_info.serial}'
^
SyntaxError: invalid syntax

Python version: Python 3.6.5 :: Anaconda, Inc.
python-dateutil (2.8.1)

How to solve it? I have spent a lot of time on solving it. Thanks

Hi @Erica-Ko - this is actually a different issue and, for now, unrelated to dateutil.

You have what appears to be a dev version of jupyter_core 4.7 - which doesn't support Python 3.5 running within Python 3.5. Since it looks like you expect to be using Anaconda with python 3.6, perhaps you haven't activated the appropriate conda environment?

The other option would be to stick with 3.5 and downgrade jupyter_core to 4.6.3.

@kevin-bates Thank you for your help : ) That's true that I haven't activated the appropriate conda environment because there is something incorrect in my /.bashrc file. I fixed it and it works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mmngreco picture mmngreco  ·  3Comments

pylang picture pylang  ·  3Comments

jonatanblue picture jonatanblue  ·  3Comments

arilwan picture arilwan  ·  3Comments

cmesro picture cmesro  ·  3Comments