Jupyter Notebook Kernel Failing

First post here. I had previously installed Julia 1.0 using Anaconda, and configured IJulia to run in a Jupyter Notebook. For various reasons unbeknown, the kernel started repeatedly failing one day, so I decided to do a fresh install. I removed Julia and Anaconda, installed from the binaries this time, and then ran Pkg.build("IJulia"), which worked successfully. However, when I try to open up the notebook I was working on again, I get this message:

Traceback (most recent call last):
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/tornado/web.py", line 1592, in _execute
    result = yield result
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/notebook/services/sessions/handlers.py", line 73, in post
    type=mtype))
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/tornado/gen.py", line 326, in wrapper
    yielded = next(result)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/notebook/services/kernels/kernelmanager.py", line 160, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 259, in start_kernel
    **kw)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/jupyter_client/manager.py", line 204, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/home/agirdhar/miniconda3/lib/python3.7/site-packages/jupyter_client/launcher.py", line 128, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "/home/agirdhar/miniconda3/lib/python3.7/subprocess.py", line 756, in __init__
    restore_signals, start_new_session)
  File "/home/agirdhar/miniconda3/lib/python3.7/subprocess.py", line 1499, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/agirdhar/anaconda3/bin/julia': '/home/agirdhar/anaconda3/bin/julia'

Indeed, the file at the bottom does not exist - there’s no anaconda3 directory because I don’t have it installed. Any ideas of what’s going on?

See this post. It might help you.

…but probably the old configuration persists in ~/.julia. This may help:

julia> ENV["JUPYTER"] = ""
julia> using Pkg
julia> Pkg.build("IJulia")