When creating a new notebook in Jupyter Notebook, selecting the Python 2 kernel, I get the red kernel error box at the top right corner. The error message when I click on the kernel error box is:
Failed to start kernel
Unhandled error
Traceback (most recent call last):File "C:\Users\me\anaconda3\lib\site-packages\tornado\web.py", line 1703, in _executeresult = await resultFile "C:\Users\me\anaconda3\lib\site-packages\tornado\gen.py", line 742, in runyielded = self.gen.throw(*exc_info) # type: ignoreFile "C:\Users\me\anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in posttype=mtype))File "C:\Users\me\anaconda3\lib\site-packages\tornado\gen.py", line 735, in runvalue = future.result()File "C:\Users\me\anaconda3\lib\site-packages\tornado\gen.py", line 742, in runyielded = self.gen.throw(*exc_info) # type: ignoreFile "C:\Users\me\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_sessionkernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)File "C:\Users\me\anaconda3\lib\site-packages\tornado\gen.py", line 735, in runvalue = future.result()File "C:\Users\me\anaconda3\lib\site-packages\tornado\gen.py", line 742, in runyielded = self.gen.throw(*exc_info) # type: ignoreFile "C:\Users\me\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_sessionself.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)File "C:\Users\me\anaconda3\lib\site-packages\tornado\gen.py", line 735, in runvalue = future.result()File "C:\Users\me\anaconda3\lib\site-packages\tornado\gen.py", line 209, in wrapperyielded = next(result)File "C:\Users\me\anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernelsuper(MappingKernelManager, self).start_kernel(**kwargs)File "C:\Users\me\anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 158, in start_kernelkm.start_kernel(**kwargs)File "C:\Users\me\anaconda3\lib\site-packages\jupyter_client\manager.py", line 305, in start_kernelself.kernel = self._launch_kernel(kernel_cmd, **kw)File "C:\Users\me\anaconda3\lib\site-packages\jupyter_client\manager.py", line 212, in _launch_kernelreturn launch_kernel(kernel_cmd, **kw)File "C:\Users\me\anaconda3\lib\site-packages\jupyter_client\launcher.py", line 135, in launch_kernelproc = Popen(cmd, **kwargs)File "C:\Users\me\anaconda3\lib\subprocess.py", line 800, in __init__restore_signals, start_new_session)File "C:\Users\me\anaconda3\lib\subprocess.py", line 1207, in _execute_childstartupinfo)FileNotFoundError: [WinError 2] The system cannot find the file specifiedThe Python 3 kernel works fine.
Also, I'm unable to create a new notebook using an environment. I can create and activate an environment from the Anaconda Command Prompt using conda create -n envname and from the Anaconda Navigator, and I can see the environment listed in the Conda tab in Jupyter Notebook. But, the environment is not listed as an option in the New dropdown box for creating a new notebook.
I'm running Windows 10 on an HP laptop.
My most recent attempt to resolve this was to start from scratch:
Uninstall Anaconda and Python (all versions I had).
Delete all of their program data that I could find, including for Jupyter Notebook, Spyder, etc.
Reinstall Anaconda 3.
Upgrade Conda (
conda upgrade conda), and upgrade all (conda upgrade --all).
This hasn't fixed it, but incidentally now Conda doesn't automatically install default packages when creating an environment, not even Python.
I have also tried installing Anaconda 2. Same problem.
I have tried installing Python 2 separately. Not a fix.
I tried looking in C:\Users\me\anaconda3\share\jupyter\kernels\python3 and found:
{"argv": ["C:/Users/me/anaconda3\\python.exe","-m","ipykernel_launcher","-f","{connection_file}" ],"display_name": "Python 3","language": "python"}The python.exe file is in C:\Users\me\anaconda3\python.exe. However, there is no \python2 folder next to C:\Users\me\anaconda3\share\jupyter\kernels\python3. And, in the anaconda installation folder, I only see supporting files for Python 3, not for Python 2. How do I install Python 2 in Anaconda 3 so that Jupyter Notebook will run the Python 2 kernel from the base rather than from an environment?
And, again/still, how do I get Jupyter to allow me to create a new notebook using a created environment?