10

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

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:

0

13 Answers 13

14

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

Sign up to request clarification or add additional context in comments.

3 Comments

This worked for me. The issue was that jupyter & python were installed via a package installer, as part of a deployable App. The "jupyter.exe" launcher, as found in the .\python\Scripts folder, is a compiled shortcut that uses a hardcoded path to define the python location. This happens to be the path used in the docker container in which the App installer package was built. Using python -m notebook executed the notebook portion without the jupyter.exe being needed
With 'python -m notebook' i can't save the jupyter session, i get "Cannot rename file or directory 'Untitled.ipynb'"
I have used jupyter notebook for 10 years and it is my first time knowing i can actually open that up through python -m....
6

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

3 Comments

Thank you. It worked after I ran following in cmd.exe %windir%\System32\cmd.exe "/K" C:\ProgramData\Anaconda3\Scripts\activate.bat C:\ProgramData\Anaconda3 then ran jupyter notebook and jupyter notebook launched. Interesting thing is now jupyter notebook launches directly from cmd.exe
I tried doing so, it works OK but I need to run this command every time I try to launch Jupyter. Also, I can't import some packages like plotly (installed from anaconda) and missingno (installed from pip). Is there a way to truly solve the problem?
@Clément F - problem was completely solved after I ran activate.bat and added anaconda to PATH on my windows 10 machine setx PATH "%PATH%;C:\ProgramData\Anaconda3;C:\ProgramData\Anaconda3\Scripts;"
6

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

Comments

3

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

2 Comments

thanks this fixed my issue. could you tell me a way to avoid adding python -m prefix?
@gopi-p I wish I knew. On one machine I seem to be forced to do it that way and on another I'm not. Environment variables appear the same. So I'm not sure - sorry!
3

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.

Comments

1

Had the same problem what I did was

pip install jupyter

and then, just went ahead and typed

jupyter notebook

works like magic now

2 Comments

You only need to pip install jupyter, the "notebook" will be ignored.. Don't see how this will solve OP's problem
Aha. I had the same problem, and I did this, then it worked. So that's why I wrote this. That's how it's going to solve OP's problem? Anyways thanks for the feedback. I will edit this!
0

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. 1.Right-click on any notebook select "open with" then select "choose another app"
    1. Now select "look for another app in pc"
    2. Go to the directory where your Anaconda Scripts are present. For me it's C:\ProgramData\Anaconda3\Scripts
    3. 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

Comments

0

For those ones who do not have anaconda

python -m jupyter notebook

Comments

0

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.

1 Comment

Seems like Microsoft were responsible for whatever happened to my Jupyter install, too. The only change I've made is installing Visual Studio Community and uninstalling Visual Studio Professional.
0

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.

Comments

0

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.

Comments

0

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

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.