Fatal Error when starting jupyter notebook - python

Issue: I get fatal error when I run jupyter notebook in cmd.exe as administratortor
in: python -m pip install jupyter
out: success
in: jupyter notebook
out: Fatal error in launcher: Unable to create process using '"'
I've tried the following, but I get same fatal error when I try to launch jupyter notebook from cmd
uninstalled jupyter and installed anadonda (https://repo.continuum.io/archive/Anaconda3-5.0.1-Windows-x86_64.exe)
tried answer listed here but does not resolve the issue (Fatal error in launcher: Unable to create process using ""C:\Program Files (x86)\Python33\python.exe" "C:\Program Files (x86)\Python33\pip.exe"")
ran pip3 install --upgrade pip and ran pip3 install jupyter
ran jupyter notebook --help and I get same error
Environment
Windows 10 Pro 64-bit version 1709 build 16299.125
Python 3.6.4 (see sys paths in screen shot below)
screen shot of error
https://www.dropbox.com/s/ai0ualjfj87uaaq/python_issue_20180127.png?dl=0
docs used:
https://jupyter.readthedocs.io/en/latest/install.html
https://jupyter.readthedocs.io/en/latest/running.html#running
http://jupyter.readthedocs.io/en/latest/install.html#alternative-for-experienced-python-users-installing-jupyter-with-pip

What worked for me was the command python -m notebook - I did not have Anaconda installed

I believe you need to open Jupyter notebooks by typing jupyter notebook in the anaconda prompt, not the regular windows command prompt.

For Windows users that have anaconda installed, try on Windows CMD/Powershell (better if you run it as admin):
(Assuming your environment is named "root")
activate root
jupyter notebook
Hope that helps

In my case, There was one redundant path of python3 added in the environment variable already and I was adding again.
I just removed that path and run jupyter notebook through command prompt and it worked perfectly.

I know this sounds strange ... But I ran:
python -m pip install jupyter
I did this inside my Anaconda (which I shouldn't have to do) and it installed jupyter... fixed the issue for me

Had the same problem what I did was
pip install jupyter
and then, just went ahead and typed
jupyter notebook
works like magic now

These command in cmd works:
activate root
jupyter notebook
The second command to open jupyter notebook is :
jupyter-notebook-script.py
I basically try to open notebooks with jupyter lab so what I have done is the following:
1.Right-click on any notebook select "open with" then select "choose another app"
Now select "look for another app in pc"
Go to the directory where your Anaconda Scripts are present. For me it's C:\ProgramData\Anaconda3\Scripts
Select "jupyter-notebook.exe" or "jupyter-lab.exe"
Now every notebook will open automatically just by hitting enter and no need to type the command again and again

For those ones who do not have anaconda
python -m jupyter notebook

I was using the Python37 installation from the Microsoft store, when I suddenly got the 'Fatal error in launcher: Unable to create process' error while trying to start the jupyter notebook. I actually tried every answer here, but with no succees.
The solution was to completely uninstall/delete everything Python/Jupyter related from AppData as well as the leftovers from my preceeding Anaconda installation and then go for a clean install from python.org.
I guess this is something we all have to do from time to time.

Check in to your Environment Variable Paths. If you had installed both Python(Python 2.x.x) or Python3(Python 3.x.x) you will have a problem running Scripts file of python, since you had duplicated install. Uninstall the redundant one.
If you had tried to fix it multiple times and nothing works, try re-install your Python. This save lives every time.

This problem is caused by your antivirus program because I suffered from the same issue, then I discovered that my antivirus software that I am using which is Avast was blocking python.exe file for some reasons that I do not understand.
So you should go to your antivirus settings and make an exception for python.exe file to unblock it.

Had the same problem and tried every suggestion here and in other forums.
In the end, removing the environment via conda remove and then creating it again worked. But I had to update conda via
conda update -n base -c defaults conda
and then start the notebook via jupyter notebook

I resolved this problem on Windows by running the Anaconda Prompt as Administrator, and then launching JupyterLab. Launching JupyterLab from the Anaconda Prompt with elevated privileges seems to have solved the issue entirely.

Related

How to get Jupiter Notebook to run when given a zsh: command not found: jupyter error

I have been using Jupiter notebook for a long time and it has worked fine. Today when I tried to use the 'jupyter notebook' command in terminal to open it, I got 'zsh: command not found: jupyter'. I have tried reinstalling Jupiter notebook and it says its already installed. I don't know what could have gone wrong, the only thing that has changed since it was working is that I installed command line tools for Xcode, but I don't know if that would cause this.
Edit: I'm on a Mac with Monterey installed.
If you are using anaconda, miniconda or conda in general, you would need to activate with conda activate <env_name> for Windows or conda source <env_name> for linuxOS, and this will require a restart of the terminal if you are doing this for the first time.
Default env name is base.
If the problem persists (or you aren't using conda) check if the pathing is correctly pointing towards python where jupyter exists / is installed. (Check which location of python is used check this question)

jupyter lab not opening on jupyter-lab in CMD like in docs

In the official jupyter labs installation guide, it says to install jupyter labs with pip install jupyterlab and then launch with jupyter-lab.
However, what I did was try the first installation method, and when the jupyter-lab command to open didn't work, I tried installing again with python -m pip install jupyterlab.
Now the jupyter-lab command that is listed still isn't recognized, but after playing around, I found that python -m jupyterlab opens jupyter labs for me.
Why is this?
Should I be concerned that I messed anything up, should I just keep using the command that I found, or try to fix my installation so that the official jupyer-lab opens the program up?
Thanks

Can't run jupyter notebooks in vscode, IPyKernel not installed into interpreter, Windows 10, Ananconda Distributor

I know there are several posts related to this error, but so far none of the solutions I've read has worked, also it seems to be dependent on the software versions, so I decided to make my own post,
The linked image shows the error message I get from vscode, when it tries to install IPyKernel it says it is already installed.
Error message in vscode
I am using python 3.7.9, conda version 4.9.2, vscode 1.52, windows 10, and the conda base environment.
Please let me know if you need any additional information or logs,
thanks in advance I hope someone can help me.
Turn to the directory which says ipykernel is already installed and delete the file ipykernel or directly empty the folder site-packages;
Open the integrated Terminal(Ctrl+Shift+`), activate the conda environment then run the command:
pip install ipykernel
Make Sure the interpreter used in jupyter should be selected rightly:
We've identified and resolved a related issue. The fix can be found in the attached VSIX.
Please could you enable logging for the Jupyter extension as follows:
1.- Open user settings (Preferences: Open User Settings & go into Jupyter->Logging
Change the value to debug and Reload VS Code.
Install this copy of the VSIX: https://pvsc.blob.core.windows.net/extension-builds-jupyter-public/ms-python-insiders.vsix
2.- Download & install using the command Extensions; Install from VSIX

Jupyter Notebook not opening (ImportError: DLL load failed)

I hope everyone is doing good.
I installed Python a couple of days ago and then I install Anaconda3 2019.
Here is the screenshot of my programs installed on my system.
Now when I am trying to work on Jupyter, it is not opening. I tried to open Jupyter Notebook directly from the start (It showed a terminal opening and closing but after that, Localhost couldn't start). Later I tried through Anaconda Prompt and it gives me this Error.
conda list command shows that Jupyter library is present but I don't know where the problem lies.
These are the paths Environment variable has:
I'm a newbie and playing with python, Jupyter. I will appreciate it if anyone can help me to solve this issue I'm currently facing.
Thanks & Regards
Umar
<<<<<<<<<<<<<<<<<<<<<<<<<<< Tried Suggestions >>>>>>>>>>>>>>>>>>>>>>>>>
Running Command conda install nb_conda produced this error:
Please follow the below steps:
conda activate <env_name>
conda install ipykernel
ipython kernel install --name <env_name> --user
If you are working on base environment, you can specify env_name as base.
Try running jupyter notebook using the command jupyter notebook
Hope this helps.
Go to your anaconda prompt and type the command conda install nb_conda.
Let this install and then try running the command jupyter notebook.
Let me know if this helps.

Jupyter can't find keras' module

I have installed Tensorflow and Keras by Anaconda (on Windows 10), I have created an environment where I am using Python 3.5.2 (the original one in Anaconda was Python 3.6).
When I try to execute import keras as ks, I get ModuleNotFoundError: No module named 'keras'.
I have tried to solve this issue by sys.path.append(C:\\Users\\ ... \\Anaconda3\\python.exe)
with both notebook and console, but I continue to get the same error.
How could I solve this issue?
Please try the following:
Run these in the jupyter notebook cell:
import sys
sys.path
sys.executable
It may not be pointing to your virtual environment but to the root
The fix is to install the jupyter notebook from inside your virtual environment
$ . your_env/bin/activate
(your_env)$ python -m pip install jupyter
Now you can import tensorflow or keras
Jupyter uses iPython under the hood, for python. So when you install Jupyter, it will also install iPython. There was one issue when I installed keras and Jupyter: I already have iPython installed in my root Anaconda environment. This is the output after I install Jupyter and keras:
In [2]: import sys; sys.path
Out[2]:
['/home/user/anaconda3/bin',
'/home/user/anaconda3/lib/python36.zip',
'/home/user/anaconda3/lib/python3.6',
'/home/user/.ipython']
Notice that even though I am inside my conda environment, it still looks for libraries in my root conda environment. And of course keras isn't there.
The step to fix is simply re-activate my environment, with:
source deactivate && source activate [my_env]
Then I am using a correct ipython:
Out[2]:
['/home/user/anaconda3/envs/ml3/bin',
'/home/user/anaconda3/envs/ml3/lib/python36.zip',
'/home/user/anaconda3/envs/ml3/lib/python3.6',
'/home/user/.ipython']
(Not an answer but some troubleshooting hints)
sys.path is not the path to your Python executable, but the path to the libraries.
Check where Keras is installed and check your sys.path. How exactly did you install Keras?
Try to execute the same command from the Python interpreter. Do you have the same issue?
How did you install Jupiter, is the sys.path visible from there the same as sys.path visible from your Python interpreter?
Do Jupiter and Keras use the same version of Python?
You might try to uninstall Jupiter and install it again, and hope that the new installation picks up the packages which are already installed. What could happen is that you have more than one Python installation and different libraries being installed to the different places. sys.path, when requested from different environments, might give you a hint if that's true.
The kernel in console and jupyter are not necessarily the same, and the problem might be that you are not on python 3.5.
python --version
should tell you what is running in the console, and in jupyter you should see it as a choice on starting a new notebook. For me, the information in
Using both Python 2.x and Python 3.x in IPython Notebook
was very helpful.
I have realized that I had two different Jupyter's directories, so I have manually deleted one on them. Finally, I have reinstalled Anaconda. Now Keras works properly.
If you are a windows/mac user who are working on Jupyter notebook “pip install keras” doesn't help you .Try the below steps.It was solved for me
1. In command prompt navigate to the “site packages” directory of your anaconda installed.
2. Now use “conda install tensorflow” and after “conda install keras”
3. Re-start your Jupyter notebook and run the packages.
Acually, I did this command pip install keras and sudo -H pip3 install keras and pip3 install keras. None of them worked. I added the following command and everything worked like a charm:
pip install Keras. Yes a capital 'K'
Here's how I solved this problem.
First, the diagnosis. When I run which python in a terminal window on my Mac (the same terminal I used to launch jupyter, I get /Users/myusername/.conda/envs/myenvname/bin/python, but when I run the same command from a terminal within Jupyter, I get /usr/bin/python. So Jupyter isn't using the correct python executable; the version it's using doesn't have any of my packages installed.
But which jupyter returns /usr/bin/jupyter; it's using a version of jupyter that isn't coming from within my conda environment. I ran conda install jupyter and now which jupyter returns /Users/myusername/.conda/envs/myenvname/bin/jupyter (for some reason I had to restart the terminal window for this to take effect.) Then if I relaunch jupyter notebook, the notebook is using the correct version of Python and I have access to all my installed conda packages. 👍
I had a similar problem.
I added the Conda environment as a new kernel.
First, install ipykernel:
conda install ipykernel
Next, create the kernet:
python -m ipykernel install --user --name tf-gpu --display-name "TensorFlow-GPU"
Now, when you run your notebook, change the kernel to the new one, to "TensorFlow-GPU" in this example.

Categories