`jupyter notebook` throws `jupyter` is not recognised error in cmd win 10
Solution 1
So I found one issue for me that is related to Python 3.8 and Jupyter. I did all the steps above but none of them really worked.
The function time.clock() has been removed, after having been deprecated since Python 3.3: use time.perf_counter() or time.process_time() instead, depending on your requirements, to have well-defined behavior. (Contributed by Matthias Bussonnier in bpo-36895.)
it from here, I downgraded to python 3.7 and it worked.
Solution 2
A 100% working solution:
This is due to "Environment Variables"
Follow these steps:
- Open the folder where you downloaded "python-3.8.2-amd64.exe" setup or any other version of python package
- Double click on "python-3.8.2-amd64.exe'
- Click "Modify"
- You will see "Optional features"
- Click "next"
- Select "Add python to environment variables"
- Click "install"
Then you can run jupyter in any desired folder you desire
E.g open the "cmd" command prompt and type:
E:
E:> jupyter notebook
It will get started without showing
Jupyter' is not recognized
Related videos on Youtube
bit_scientist
Updated on September 18, 2022Comments
-
bit_scientist over 1 year
I moved the question from stackoverflow as it is said that this stack is more suitable
I am using an python 3.8 in an offline regime. Namely, if I need some package to install, I'll go and download that
package.whl
orpackage.tar.gz
and install usingpip install package.whl
. Once I wanted to install jupyter notebook and it required bunch of other packages to be installed. I patiently installed all that were necessary. At the end, I have the following trace:pip install jupyter-1.0.0.tar.gz Processing c:\py38\lib\site-packages\jupyter-1.0.0.tar.gz Requirement already satisfied: notebook in c:\py38\lib\site-packages (from jupyter==1.0.0) (6.0.2) Requirement already satisfied: qtconsole in c:\py38\lib\site-packages (from jupyter==1.0.0) (4.6.0) Requirement already satisfied: jupyter-console in c:\py38\lib\site-packages (from jupyter==1.0.0) (6.1.0) Requirement already satisfied: nbconvert in c:\users\user\appdata\roaming\python\python38\site-packages (from jupyter==1.0.0) (5.6.1) Requirement already satisfied: ipykernel in c:\users\user\appdata\roaming\python\python38\site-packages (from jupyter==1.0.0) (5.1.3) Requirement already satisfied: ipywidgets in c:\py38\lib\site-packages (from jupyter==1.0.0) (7.5.1) Requirement already satisfied: jinja2 in c:\py38\lib\site-packages (from notebook->jupyter==1.0.0) (2.10.3) Requirement already satisfied: tornado>=5.0 in c:\py38\lib\site-packages (from notebook->jupyter==1.0.0) (6.0.3) Requirement already satisfied: pyzmq>=17 in c:\users\user\appdata\roaming\python\python38\site-packages (from notebook->jupyter==1.0.0) (18.1.1) Requirement already satisfied: ipython_genutils in c:\users\user\appdata\roaming\python\python38\site-packages (from notebook->jupyter==1.0.0) (0.2.0) Requirement already satisfied: traitlets>=4.2.1 in c:\users\user\appdata\roaming\python\python38\site-packages (from notebook->jupyter==1.0.0) (4.3.3) Requirement already satisfied: jupyter_core>=4.6.0 in c:\users\user\appdata\roaming\python\python38\site-packages (from notebook->jupyter==1.0.0) (4.6.1) Requirement already satisfied: jupyter_client>=5.3.4 in c:\users\user\appdata\roaming\python\python38\site-packages (from notebook->jupyter==1.0.0) (5.3.4) Requirement already satisfied: nbformat in c:\users\user\appdata\roaming\python\python38\site-packages (from notebook->jupyter==1.0.0) (5.0.3) Requirement already satisfied: Send2Trash in c:\users\user\appdata\roaming\python\python38\site-packages (from notebook->jupyter==1.0.0) (1.5.0) Requirement already satisfied: terminado>=0.8.1 in c:\users\user\appdata\roaming\python\python38\site-packages (from notebook->jupyter==1.0.0) (0.8.3) Requirement already satisfied: prometheus_client in c:\py38\lib\site-packages (from notebook->jupyter==1.0.0) (0.7.1) Requirement already satisfied: pygments in c:\users\user\appdata\roaming\python\python38\site-packages (from qtconsole->jupyter==1.0.0) (2.5.2) Requirement already satisfied: ipython in c:\users\user\appdata\roaming\python\python38\site-packages (from jupyter-console->jupyter==1.0.0) (7.8.0) Requirement already satisfied: prompt_toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in c:\users\user\appdata\roaming\python\python38\site-packages (from jupyter-console->jupyter==1.0.0) (2.0.2) Requirement already satisfied: mistune<2,>=0.8.1 in c:\users\user\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter==1.0.0) (0.8.4) Requirement already satisfied: entrypoints>=0.2.2 in c:\users\user\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter==1.0.0) (0.3) Requirement already satisfied: bleach in c:\users\user\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter==1.0.0) (3.1.0) Requirement already satisfied: pandocfilters>=1.4.1 in c:\users\user\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter==1.0.0) (1.4.2) Requirement already satisfied: testpath in c:\users\user\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter==1.0.0) (0.4.4) Requirement already satisfied: defusedxml in c:\users\user\appdata\roaming\python\python38\site-packages (from nbconvert->jupyter==1.0.0) (0.6.0) Requirement already satisfied: widgetsnbextension~=3.5.0 in c:\py38\lib\site-packages (from ipywidgets->jupyter==1.0.0) (3.5.1) Requirement already satisfied: MarkupSafe>=0.23 in c:\py38\lib\site-packages (from jinja2->notebook->jupyter==1.0.0) (1.1.1) Requirement already satisfied: six in c:\users\user\appdata\roaming\python\python38\site-packages (from traitlets>=4.2.1->notebook->jupyter==1.0.0) (1.14.0) Requirement already satisfied: decorator in c:\users\user\appdata\roaming\python\python38\site-packages (from traitlets>=4.2.1->notebook->jupyter==1.0.0) (4.4.1) Requirement already satisfied: pywin32>=1.0 in c:\users\user\appdata\roaming\python\python38\site-packages (from jupyter_core>=4.6.0->notebook->jupyter==1.0.0) (227) Requirement already satisfied: python-dateutil>=2.1 in c:\users\user\appdata\roaming\python\python38\site-packages (from jupyter_client>=5.3.4->notebook->jupyter==1.0.0) (2.5.0) Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in c:\users\user\appdata\roaming\python\python38\site-packages (from nbformat->notebook->jupyter==1.0.0) (3.0.0) Requirement already satisfied: pywinpty>=0.5; os_name == "nt" in c:\users\user\appdata\roaming\python\python38\site-packages (from terminado>=0.8.1->notebook->jupyter==1.0.0) (0.5.7) Requirement already satisfied: setuptools>=18.5 in c:\users\user\appdata\roaming\python\python38\site-packages (from ipython->jupyter-console->jupyter==1.0.0) (45.1.0) Requirement already satisfied: jedi>=0.10 in c:\users\user\appdata\roaming\python\python38\site-packages (from ipython->jupyter-console->jupyter==1.0.0) (0.14.1) Requirement already satisfied: pickleshare in c:\users\user\appdata\roaming\python\python38\site-packages (from ipython->jupyter-console->jupyter==1.0.0) (0.7.5) Requirement already satisfied: backcall in c:\users\user\appdata\roaming\python\python38\site-packages (from ipython->jupyter-console->jupyter==1.0.0) (0.1.0) Requirement already satisfied: colorama in c:\users\user\appdata\roaming\python\python38\site-packages (from ipython->jupyter-console->jupyter==1.0.0) (0.4.3) Requirement already satisfied: wcwidth in c:\users\user\appdata\roaming\python\python38\site-packages (from prompt_toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->jupyter-console->jupyter==1.0.0) (0.1.8) Requirement already satisfied: webencodings in c:\users\user\appdata\roaming\python\python38\site-packages (from bleach->nbconvert->jupyter==1.0.0) (0.5.1) Requirement already satisfied: attrs>=17.4.0 in c:\users\user\appdata\roaming\python\python38\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->notebook->jupyter==1.0.0) (19.3.0) Requirement already satisfied: pyrsistent>=0.14.0 in c:\users\user\appdata\roaming\python\python38\site-packages (from jsonschema!=2.5.0,>=2.4->nbformat->notebook->jupyter==1.0.0) (0.15.7) Requirement already satisfied: parso>=0.5.0 in c:\users\user\appdata\roaming\python\python38\site-packages (from jedi>=0.10->ipython->jupyter-console->jupyter==1.0.0) (0.5.0) Installing collected packages: jupyter Found existing installation: jupyter 1.0.0 Uninstalling jupyter-1.0.0: Successfully uninstalled jupyter-1.0.0 Running setup.py install for jupyter ... done Successfully installed jupyter-1.0.0
I thought "now it'll work" but I was wrong,
jupyter notebook
command in terminal threw:'jupyter' is not recognized as an internal or external command, operable program or batch file.
Trying to find a solution I googled and came to know that either I should use Anaconda or have jupyter.exe in my C:\py38\Scripts path (and that exact path should be added into System variables). But I don't have
jupyter.exe
there, but I have already added C:\py38\Scripts to above-mentioned place. I am not willing to use Anaconda (that's another story) and for latter part, there are these files in the folder:I tried restarting the PC but to no avail.
Could anyone help with that? Thanks
Edit: I don't know what
jupyter-notebook
is supposed to do but when I type it in thecmd
it throws the following:jupyter-notebook Traceback (most recent call last): File "C:\py38\Scripts\jupyter-notebook-script.py", line 11, in <module> load_entry_point('notebook==6.0.2', 'console_scripts', 'jupyter-notebook')() File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\jupyter_core\application.py", line 268, in launch_instance return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs) File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\traitlets\config\application.py", line 663, in launch_instance app.initialize(argv) File "<C:\Users\user\AppData\Roaming\Python\Python38\site-packages\decorator.py:decorator-gen-7>", line 2, in initialize File "C:\Users\user\AppData\Roaming\Python\Python38\site-packages\traitlets\config\application.py", line 87, in catch_config_error return method(app, *args, **kwargs) File "c:\py38\lib\site-packages\notebook\notebookapp.py", line 1720, in initialize self.init_webapp() File "c:\py38\lib\site-packages\notebook\notebookapp.py", line 1482, in init_webapp self.http_server.listen(port, self.ip) File "c:\py38\lib\site-packages\tornado\tcpserver.py", line 152, in listen self.add_sockets(sockets) File "c:\py38\lib\site-packages\tornado\tcpserver.py", line 165, in add_sockets self._handlers[sock.fileno()] = add_accept_handler( File "c:\py38\lib\site-packages\tornado\netutil.py", line 279, in add_accept_handler io_loop.add_handler(sock, accept_handler, IOLoop.READ) File "c:\py38\lib\site-packages\tornado\platform\asyncio.py", line 99, in add_handler self.asyncio_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ) File "c:\py38\lib\asyncio\events.py", line 501, in add_reader raise NotImplementedError NotImplementedError
-
harrymc over 4 yearsTry to run
python -m notebook
orpy -m notebook
.
-
-
bit_scientist over 3 yearsnot sure it was the cause, but it worked when I downgraded to 3.7.4. But, it's now linked to Anaconda
-
Alexander Oh over 3 yearsi guess anaconda is another form of an environment manager, I'm pretty sure you can select the interpreter when creating an environment otherwise there is little point to them.