TransWikia.com

Jupyter Notebooks Open in VSCode but not in Terminal

Ask Ubuntu Asked on December 21, 2021

I am pretty new in the Linux world. Just installed it one week ago.

Now I am facing an annoying problem. Its probably an easy/stupid thing that I am missing.

Here is the thing: I am a VSCode lover, so the first software installed was this. I was using it normally to my Data Science tasks, using the inbuilt jupyter notebook on it.

Today I decided to run jupyter notebook from Ubuntu`s terminal and this is what i got

Command 'jupyter' not found, but can be installed with:

sudo snap install jupyter       # version 1.0.0, or
sudo apt  install jupyter-core  # version 4.6.3-3

See 'snap info jupyter' for additional versions.

but when i run the same jupyter notebook command in the VScode terminal it opens normally.

What am I missing ?

2 Answers

In order to be able to answer your questions, some details regarding your Python installation/ configuration are needed.

How did you install the Python? Do you use Anaconda? The Ubuntu comes with a Python pre-installed (Python 3.6). So maybe you have two different python versions? The command sudo apt install will install into your Ubuntu Python (system) installation, while sudo snap install will install a containerized "snap" package. If you use Anaconda then you should install packages using Conda (and also manage your local environments). So, the solution depends on the way you configured your Python environment in the first place.

I would recommend using Anaconda (or Miniconda), with Python package management using the Conda (i.e. creating virtual environments with different dependencies). This way you are isolated from the system Python (which comes bundled with the Ubuntu and is needed for the OS) and you update and manage your Python packages (and environments) using the conda. Hope this helps.

Answered by Ivan on December 21, 2021

Jupyter notebook doesn't seems installed on your computer. I don't know if the jupyter notebook plugin included in vscode actually installs the standard jupyter-notebook command on your computer. In that case just run sudo apt install jupyter-notebook.

Also the command line for jupyter notebook is jupyter-notebook. It will start a jupyter notebook server that you can then join with your web browser (an url will be displayed).
EDIT: jupyter notebook works too, so it's probably just not installed.

Answered by Kasonnara on December 21, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP