When attempting to run Jupyter in the command prompt, you might encounter the error:
'jupyter' is not recognized as an internal or external command, operable program, or batch file.
Windows uses environment variables to find executable files like jupyter.exe. If Jupyter’s installation directory is not added to the system’s Path variable, the operating system won’t be able to locate it, resulting in the error, which means Windows can’t find the path to Jupyter’s executable.
Step-by-Step Solution:
Here’s how you can resolve this issue:
Step 1: Verify Jupyter Installation
Ensure that the Jupyter notebook is installed in your device by searching on search bar. If the Jupyter notebook is displaying and opening properly. Then you are good to go for next step. If you are not able to get Jupyter notebook from search result, then install the Jupyter notebook using Anaconda Distribution installation. you can also follow the below video tutorial.
Step 2: Find Jupyter’s Installation Path
Before adding the Installation Path, we need to find it. To find the Installation path, search Jupyter Notebook in search, where you will see Jupyter notebook with an option of open file location at right side as shown in the figure 1 below.
Once you click on the Open file location option, new window will open, where you can see shortcut of the Jupyter notebook icon as shown in figure 2 below. Right click on the shortcut icon and again click on Open file location.
When you click on the open file location, this time you will see a large number of files and folders. If you scroll up, then you can see a Scripts folder as shown in figure 3 below. you need to open the folder.
Once you open script folder, you can see list of files, where one file is jupyter.exe file. Here, you need to copy the path of upto the Scripts directory just by clicking on the path bar as shown in the figure 4 below.
If you have copied the path, then you are good to in next step to add the path in environment variable.
Step 3: Add Jupyter to the Environment variable
To add path, search environment variable and open it as shown in figure 5 below.
Click on the Environment Variable options as shown in figure 6 as shown above. A new window will open, where you need to select the path in user variable section and click Edit button as shown in figure 7 below.
When you click edit, you can see a new window to add path as shown in figure 8 below. Click on New button to add the path that you copied earlier and click OK button.
If you have completed all the steps described in this blog, then you are ready for final test. Close your command prompt if any opened, then run command given below. This time you will get a success response and it will open Jupyter notebook.
If you are still getting the issue to understand the issue, you can also watch the attached video tutorial below.
I hope this blog helped you to fix the issue. Thanks for your valuable time, Have a nice day.