Jt is not recognized as an internal or external command, operable program or batch file

Hello, I'm trying to install themes for jupyter notebook but no commands work at all.

I tried

python -m jupyterthemes

and

python -m jt

and I get the error "No module named jupyterthemes.main; 'jupyterthemes' is a package and cannot be directly executed".

Python is already in my PATH envinronment variables. Any idea how to fix install these themes to jupyter?

Jupyter Notebook is an open-source web-based project that is used to create and share documents, programming files, and text contents with other users.

When you first install Python, Jupyter does not come as a default installation along with the python. You have to install it separately. You are here means you are facing “jupyter is not recognized as an internal or external command, operable program or batch file” error message.

Jt is not recognized as an internal or external command, operable program or batch file

Don’t worry it’s a very basic configuration side error and it occurs when you are using Jupyter for the first time. Once the required configuration is done, you will not face this error message again.  

There are following two reasons which cause “jupyter is not recognized as an internal or external command” error.

  • Jupyter is not installed on the system
  • Incorrect path of an executable in the system environment variable

Go through this article thoroughly to understand these reasons and get rid of this error message.

We will first see how to install jupyter on the system and then we will set the required environment variable.

Step 1: Install jupyter on your windows system

The first thing to check is whether you have installed jupyter on your system or not. If you have not installed jupyter and tried to use jupyter command then off course you will get above error message as this functionality is not available on your system.

If you have already installed jupyter then move to Step 2 else follow the below stepwise procedure to install jupyter on your windows system.

You can use the pip application of python to install jupyter on your system.

Open Command Prompt

Go to the Start menu and search for a Run application or directly press the Windows + R shortcut key. In the Run application type cmd and hit enter or click an ok button.

Run jupyter command

Run the following command on the command prompt as shown below.

python -m pip install jupyter
Jt is not recognized as an internal or external command, operable program or batch file

Step 2: Set Executable Path In The Environment Variable

Note: Here we have assumed that you have installed jupyter on your environment.

If you have installed jupyter and still getting the error message then check for the system PATH variable. Either you have not entered jupyter executable path in the PATH system variable or the entered path is incorrect.

Follow the below stepwise procedure to set the correct jupyter executable path in the environment variable.

Go to Control Panel — > System and Security — > System

Jt is not recognized as an internal or external command, operable program or batch file

In the System Properties pane, select the Advanced tab and click on Environment variable option as shown below.

Jt is not recognized as an internal or external command, operable program or batch file

The environment variable window will open to set the user variable and system variable. Here we will set the system variable so that it will be applicable for all the users of the system. When you install the jupyter, all required executable gets added into the Scripts folder of python installation.

Add path up to scripts folder of python installation in the variable value as shown below and click ok as shown below.

Jt is not recognized as an internal or external command, operable program or batch file

Note 1:  After changing the environment variable value, make sure to open a new command prompt to execute jupyter command. If you tried to run jupyter command on the same command prompt then you will again get “jupyter is not recognized as an internal or external command” error message.

Note 2: Some of our users noted that running command prompt in administrative mode resolved their issue. After configuring the above setting if you are still getting the same error message then try running the command prompt in administrative mode.

Conclusion:

We hope, using the above steps you are able to get rid of “jupyter is not recognized as an internal or external command, operable program or batch file” error message.

Please let us know whether you are able to fix this error with the above steps or not in the comment section. You can also reach out to us using Contact Form.

What is not recognized as an internal or external command operator program or batch file error in Jupyter notebook?

You have to install it separately. You are here means you are facing “jupyter is not recognized as an internal or external command, operable program or batch file” error message. Don't worry it's a very basic configuration side error and it occurs when you are using Jupyter for the first time.

Why is jupyter not recognized?

If you're using a menu shortcut or Anaconda launcher to start it, try opening a terminal or command prompt and running the command jupyter notebook . If it can't find jupyter , you may need to configure your PATH environment variable.

Why is Python not recognized in CMD?

The “Python is not recognized as an internal or external command” error is encountered in the command prompt of Windows. The error is caused when Python's executable file is not found in an environment variable as a result of the Python command in the Windows command prompt.

How do I change my Jupyter notebook to default theme?

Run "pip install jupyterthemes" This should show you the themes installed/ cached by jupyter notebook. Now run "jt -r" to reset the theme to default as shown below. Open and test jupyter notebook. Theme should be gone now.