41

I installed python and jupyter notebook through the Anaconda distribution. I have been successfully using jupyter notebook for weeks and it has run perfectly fine. However, I can only launch a notebook through the Anaconda Navigator GUI.

When I try to run the command (in command prompt) to start a notebook it says

'jupyter' is not recognized as an internal or external command 

This is also the same case with Python

'python' is not recognized as an internal or external command 

I am using Windows 10. I am assuming its a PATH issue but I have not had any luck with the solutions I found from other posts. I am relatively new to programming and python so any help would be greatly appreciated.

6
  • Do you have anaconda prompt installed? Then you can use python or jupyter there. Commented Sep 12, 2018 at 3:46
  • possibly try using choco package manager. I still had issues installing jupyter so I ended up using a Cloud VM ( AWS -> EC2 - use the free tier AMI ). doco. tutorial Commented Sep 12, 2018 at 3:49
  • so both python and jupyter notebook are installed in your conda environments that your command prompt can't locate. If you don't mind you could install them again (not in anaconda), otherwise you need to run them inside anaconda prompt as Kota suggested. Commented Sep 12, 2018 at 4:08
  • Probably not in your path. Windows or Unix? Check your path and see if the jupyter install location is in the path. Commented Sep 12, 2018 at 6:39
  • @KotaMori I am trying to run "jupyter" from Anaconda prompt and I get "not recognized" error Commented Oct 29, 2019 at 12:28

14 Answers 14

103

Yes, This is the problem which I faced also during the installation of Jupyter Notebook. But I know the solution of this. I hope, it also works for you as well.

  1. Open cmd.
  2. Type: pip install notebook.
  3. If you Type: **jupyter notebook** - it always shows an error.
  4. So, Type: python -m notebook.

Image shows running Jupyter Notebook

If you feel that this answer is useful and works for you, I expected. So, please press the Up Button for other peoples. So that they can also get some help.

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

3 Comments

Did the "pip install notebook" and succeeded and then "python -m notebook" but got "python.exe: No module named Notebook"
First, pip install jupyter notebook then, python -m notebook worked for me.
python -m jupyterlab worked when I ran into the same issue in VSCode/Win10
17

I've just fixed this issue on my windows 10 machine. My path contained

C:\Users\user\AppData\Local\Programs\Python\Python37\Scripts\ 

where 'user' is my windows username, however for some reason jupyter.exe installed in

 C:\Users\user\AppData\Roaming\Python\Python37\Scripts 

I'm not really sure why and I'd like to get to the bottom of it, but adding both the local and roaming version to my path fixed this.

1 Comment

Where to check the path?
8

The issue 'jupyter' is not recognized as an internal or external command is mainly due to no path or wrong path of jupyter in windows environment variables.

In my case related files were available in C:\ProgramData\Anaconda3\Scripts and so i have added this path in Windows as shown below and then you can run from any path:

enter image description here

One important thing: after that while running jupter notebook from any location may give DLL Error. You have to first give command activate base and then jupyter notebook. Enjoy working now.

Comments

7

Run conda install ipykernel in that environment and then type jupyter notebook, it will lead to jupyter notebook window.

Comments

5

Just had a similar problem tried it in cmd as well as Powershell, checked other suggestions too. However, the command isn't jupyter notebook it is : jupyter-notebook

1 Comment

WT-literal-F?! Same for jupyter-lab. Why is this not in the official docs? Anyway, thanks for this!
3

If you are facing the issue with the error as below when trying to launch jupyter notebook:

jupyter : The term 'jupyter' is not recognized as the name of a cmdlet, function, script file, or operable program.

Try using below command in TERMINAL:

python -m notebook

Comments

3

I recently faced this problem and overcame it by below following the command.

If you installed Jupyter Notebook through Commandline or Anaconda. for Windows 10

First check how your Python is running in command using

Using this command

C:\Users\admin>py 

or this command

C:\Users\admin>Python 

Most probably your Python starts with the py command.

Now type the below command to run Jypyter

C:\Users\admin>py -m jupyter notebook 

or try

C:\Users\admin>python -m jupyter notebook 

It'll start jupyter notebook on the browser.

Make sure to add the complete name jupyter notebook. It's working with Windows 10

I hope it helps.

Comments

2

try typing

> conda install jupyter 

inside your environment and then try to open jupyter notebook again.

Comments

1

You are suppoused to check in the two check boxes which are present at the beginning of installation.If you uninstall and reinstall it again it works fine

2 Comments

Hi @Chandra, could you please elaborate on the answer you provided? Which check boxes it needs to be checked?
@ toshiro92 I think he's talking about the checkboxes which appear when we install Anaconda. But I checked both of them still the same problem arised
0

Here is a supplementary suggestion with respect to @Subhasish Paul 's Answer:

When creating a new path to the user variable (if you chose the option "install for all users" you may need to create a system variable), also include another path of "bin" in your environment variables, simply entering where conda in Anaconda Prompt to look for it. For me it's C:\ProgramData\Anaconda3\Library\bin .

Adding this extra path in your environment variables will eliminate DLL Error, hence you don't have to activate conda each time when you want to open jupyter notebook. It works for me very well.

Comments

0

Anybody looking to run Jupyter from command line or want to see the token for running Jupyter server (if he/was logged out from running notebook), you run the target command from Jupyter Notebook shortcut ..

Jupyter notebook Shortcut

Comments

0

I was also getting:

'jupyter' is not recognized as an internal or external command,operable program or batch file.

This worked for me on Windows 11

Install Python Install conda conda install jupyter conda run jupyter notebook 

1 Comment

Jai Shah already suggested running conda install jupyter a couple of years ago. Please don't repeat answers.
-1

just run your cmd (or PyCharm, or PowerShell etc.) as Administrator

Comments

-3

Python -m notebook Use this command

2 Comments

1st in cmd type pip install jupyter ,after installation done then type python -m notebook.wait 5 mins jupyter window automatically open .
Please don't repeat answers.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.