Updating Anaconda has broken Jupyter

103 views
Skip to first unread message

gwhe...@ebay.com

unread,
Feb 21, 2018, 4:39:05 PM2/21/18
to Project Jupyter
HI all

Yesterday I did an update of all the packages in my Anaconda install, and now I can no longer start kernels in Jupyter. I'm getting this when I try to open a notebook:

Traceback (most recent call last):
  File "/Users/gwheeler/anaconda/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/Users/gwheeler/anaconda/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/gwheeler/anaconda/lib/python3.6/site-packages/ipykernel_launcher.py", line 15, in <module>
    from ipykernel import kernelapp as app
  File "/Users/gwheeler/anaconda/lib/python3.6/site-packages/ipykernel/__init__.py", line 2, in <module>
    from .connect import *
  File "/Users/gwheeler/anaconda/lib/python3.6/site-packages/ipykernel/connect.py", line 13, in <module>
    from IPython.core.profiledir import ProfileDir
  File "/Users/gwheeler/anaconda/lib/python3.6/site-packages/IPython/__init__.py", line 45, in <module>
    from .config.loader import Config
  File "/Users/gwheeler/anaconda/lib/python3.6/site-packages/IPython/config/__init__.py", line 6, in <module>
    from .application import *
  File "/Users/gwheeler/anaconda/lib/python3.6/site-packages/IPython/config/application.py", line 19, in <module>
    from IPython.config.configurable import SingletonConfigurable
  File "/Users/gwheeler/anaconda/lib/python3.6/site-packages/IPython/config/configurable.py", line 14, in <module>
    from IPython.utils.text import indent, wrap_paragraphs
  File "/Users/gwheeler/anaconda/lib/python3.6/site-packages/IPython/utils/text.py", line 28, in <module>
    from IPython.external.path import path
ImportError: cannot import name 'path'

Package versions:

ipython==3.2.3
ipython-genutils==0.2.0
jupyter-client==5.2.2
jupyter-console==5.2.0
jupyter-contrib-core==0.3.3
jupyter-contrib-nbextensions==0.4.0
jupyter-core==4.4.0
jupyter-highlight-selected-word==0.1.0
jupyter-latex-envs==1.4.1
jupyter-nbextensions-configurator==0.4.0
jupyter-pip==0.3.1
jupyterlab==0.31.8
jupyterlab-launcher==0.10.5
notebook==5.4.0


Anyone else having this issue?

Thanks!
Graham

gwhe...@ebay.com

unread,
Feb 21, 2018, 5:00:54 PM2/21/18
to Project Jupyter
Just checked on the website and it seems that the latest IPython should be 6.x.

If I run "conda update ipython" conda says I have 6.2.1, but if I run "pip freeze" then I get 3.2.3. So something has gotten really messed up somehow.

I'll figure it out.

gwhe...@ebay.com

unread,
Feb 21, 2018, 7:48:51 PM2/21/18
to Project Jupyter
I ended up having to reinstall Anaconda. Not sure how it got so messed up but it turned into a game of whack-a-mole and even creating new virtualenvs didn't help.


On Wednesday, February 21, 2018 at 1:39:05 PM UTC-8, gwhe...@ebay.com wrote:

Roland Weber

unread,
Feb 22, 2018, 2:16:18 AM2/22/18
to Project Jupyter
On Thursday, February 22, 2018 at 1:48:51 AM UTC+1, gwhe...@ebay.com wrote:
I ended up having to reinstall Anaconda. Not sure how it got so messed up but it turned into a game of whack-a-mole and even creating new virtualenvs didn't help.

Mixing conda envs with virtualenvs sounds like a bad idea.

I recommend using Miniconda instead of the full Anaconda installer. The latter will put a ton of packages into the conda root environment. While other conda environments don't inherit the packages from there, its bin folder is in the path. So command-line programs like jupyter might be started from and running in the conda root environment, while you're looking at the package list of some other conda environment.

Miniconda keeps the root environment as clean as possible. And you can still install the default packages from Anaconda in any other conda environment, using the meta package "anaconda".

cheers,
  Roland

Graham Wheeler

unread,
Feb 22, 2018, 10:15:29 AM2/22/18
to jup...@googlegroups.com
To be clear, when I said “virtualenv” I was talking about conda virtual environments; I was not mixing them. 

Possibly what happened was a pip installed package pulled in some old dependencies and things somehow got mixed up. I now suspect it was nb-mermaid, as that was the only other thing I remember installing between the time it worked and it broke.


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/20d86fb4-6d49-4ff0-9ed5-50e5b05ec854%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fernando Perez

unread,
Feb 24, 2018, 1:56:53 AM2/24/18
to Project Jupyter
On Thu, Feb 22, 2018 at 7:15 AM, Graham Wheeler <gr...@geekraver.com> wrote:
To be clear, when I said “virtualenv” I was talking about conda virtual environments; I was not mixing them. 

Possibly what happened was a pip installed package pulled in some old dependencies and things somehow got mixed up. I now suspect it was nb-mermaid, as that was the only other thing I remember installing between the time it worked and it broke.

This is my defense mechanism against that problem:


it's hackish and I haven't taken the time to make it a clean, installable package, but it gets the basic job of 100% isolation between conda and pip done.  Pip is an 'overlay' atop conda, which supersedes it in import priority but doesn't mingle in the filesystem, so any confusing side effects are easy to clean up if they ever arise.

Cheers

Reply all
Reply to author
Forward
0 new messages