Can't run any ipynb files using Jupyter Lab or Jupyter Notebook (FileNotFoundError: [WinError 2] The system cannot find the file specified)
Question:
I have JupyterLab/JupyterNotebook running on Win10, along with Python and PyCharm on the side on Windows 10. Whenever I launch JupyterLab/JupyterNotebook I get the error stated below. I have tried reinstalling the Anaconda-distribution or any other instances of Python but it gives me the same error every time I launch JupyterLab/Notebook. I have also tried running it on a remote server with Win 7 but it gives me the exact same error. Part of me thinks that I made the same mistake while installing Anaconda, Python, and PyCharm and now I can’t revert it back. Any suggestions?
Traceback (most recent call last):
File "E:anaconda3libsite-packagestornadoweb.py", line 1543, in _execute
result = yield result
File "E:anaconda3libsite-packagestornadogen.py", line 1099, in run
value = future.result()
File "E:anaconda3libsite-packagestornadogen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "E:anaconda3libsite-packagesnotebookservicessessionshandlers.py", line 73, in post
type=mtype))
File "E:anaconda3libsite-packagestornadogen.py", line 1099, in run
value = future.result()
File "E:anaconda3libsite-packagestornadogen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "E:anaconda3libsite-packagesnotebookservicessessionssessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "E:anaconda3libsite-packagestornadogen.py", line 1099, in run
value = future.result()
File "E:anaconda3libsite-packagestornadogen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "E:anaconda3libsite-packagesnotebookservicessessionssessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "E:anaconda3libsite-packagestornadogen.py", line 1099, in run
value = future.result()
File "E:anaconda3libsite-packagestornadogen.py", line 315, in wrapper
yielded = next(result)
File "E:anaconda3libsite-packagesnotebookserviceskernelskernelmanager.py", line 148, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "E:anaconda3libsite-packagesjupyter_clientmultikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "E:anaconda3libsite-packagesjupyter_clientmanager.py", line 259, in start_kernel
**kw)
File "E:anaconda3libsite-packagesjupyter_clientmanager.py", line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "E:anaconda3libsite-packagesjupyter_clientlauncher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "E:anaconda3libsubprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "E:anaconda3libsubprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
Answers:
There are many reasons for that. But you may try to re-install the jupyter as the following commands:
pip install –upgrade pip
pip install jupyter
and then run jupyter
jupyter notebook
This problem happend to me once and I sorted it out by running the above commend from with the Anaconda prompt. you may need to upgrade pip before doing that.
It seemed it had something to do with nb_conda. Once I reinstalled nb_conda using the command below, it worked for me.
conda install nb_conda
I had exactly the same problem. I found the solution here (please follow the link for further explanation), by typing this in cmd in my virtual environment the problem was solved:
python -m ipykernel install --user
I hope it will help
It is probably because you delete an env and there is still a reference to that env. To solve the problem, run the following command on the command prompt:
python -m ipykernel install --user
Hope this helps 🙂
From Github
https://github.com/jupyter/notebook/issues/4079#issuecomment-429475420
go to directory: /python/share/jupyter/kernels/
open the file "kernel.json", and set the "argv": the python path for example.
{
"argv": [
"C:Anaconda3python.exe",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"language": "python"
}
launch jupyter notebook. Everything is fine now.
Executing the command:
python -m ipykernel install --user
solved this problem for me. So thank you!
It can be due to a change in address line available in the following file: [YOUR_ENVIRONMENT ]sharejupyterkernelspython3kernel.json
. Correct your environment path address in this file.
You can take a look at here: https://insilico-notebook.com/en/jupyter-kernel-error/ as well.
I have JupyterLab/JupyterNotebook running on Win10, along with Python and PyCharm on the side on Windows 10. Whenever I launch JupyterLab/JupyterNotebook I get the error stated below. I have tried reinstalling the Anaconda-distribution or any other instances of Python but it gives me the same error every time I launch JupyterLab/Notebook. I have also tried running it on a remote server with Win 7 but it gives me the exact same error. Part of me thinks that I made the same mistake while installing Anaconda, Python, and PyCharm and now I can’t revert it back. Any suggestions?
Traceback (most recent call last):
File "E:anaconda3libsite-packagestornadoweb.py", line 1543, in _execute
result = yield result
File "E:anaconda3libsite-packagestornadogen.py", line 1099, in run
value = future.result()
File "E:anaconda3libsite-packagestornadogen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "E:anaconda3libsite-packagesnotebookservicessessionshandlers.py", line 73, in post
type=mtype))
File "E:anaconda3libsite-packagestornadogen.py", line 1099, in run
value = future.result()
File "E:anaconda3libsite-packagestornadogen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "E:anaconda3libsite-packagesnotebookservicessessionssessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "E:anaconda3libsite-packagestornadogen.py", line 1099, in run
value = future.result()
File "E:anaconda3libsite-packagestornadogen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "E:anaconda3libsite-packagesnotebookservicessessionssessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "E:anaconda3libsite-packagestornadogen.py", line 1099, in run
value = future.result()
File "E:anaconda3libsite-packagestornadogen.py", line 315, in wrapper
yielded = next(result)
File "E:anaconda3libsite-packagesnotebookserviceskernelskernelmanager.py", line 148, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "E:anaconda3libsite-packagesjupyter_clientmultikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "E:anaconda3libsite-packagesjupyter_clientmanager.py", line 259, in start_kernel
**kw)
File "E:anaconda3libsite-packagesjupyter_clientmanager.py", line 204, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "E:anaconda3libsite-packagesjupyter_clientlauncher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "E:anaconda3libsubprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "E:anaconda3libsubprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
There are many reasons for that. But you may try to re-install the jupyter as the following commands:
pip install –upgrade pip
pip install jupyter
and then run jupyter
jupyter notebook
This problem happend to me once and I sorted it out by running the above commend from with the Anaconda prompt. you may need to upgrade pip before doing that.
It seemed it had something to do with nb_conda. Once I reinstalled nb_conda using the command below, it worked for me.
conda install nb_conda
I had exactly the same problem. I found the solution here (please follow the link for further explanation), by typing this in cmd in my virtual environment the problem was solved:
python -m ipykernel install --user
I hope it will help
It is probably because you delete an env and there is still a reference to that env. To solve the problem, run the following command on the command prompt:
python -m ipykernel install --user
Hope this helps 🙂
From Github
https://github.com/jupyter/notebook/issues/4079#issuecomment-429475420
go to directory: /python/share/jupyter/kernels/
open the file "kernel.json", and set the "argv": the python path for example.
{
"argv": [
"C:Anaconda3python.exe",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"language": "python"
}
launch jupyter notebook. Everything is fine now.
Executing the command:
python -m ipykernel install --user
solved this problem for me. So thank you!
It can be due to a change in address line available in the following file: [YOUR_ENVIRONMENT ]sharejupyterkernelspython3kernel.json
. Correct your environment path address in this file.
You can take a look at here: https://insilico-notebook.com/en/jupyter-kernel-error/ as well.