Hi.
In this video we'll install a few useful Jupyter extensions,
which will simplify our work with the notebooks.
We have to install few packages.
But first I would like to tell you a little bit about the basics on how to
manage Python virtual environments and packages.
As I mentioned to you in our previous video,
we have Anaconda installed and we are using its space environment.
Anaconda is basically a Python distribution,
which provided a lot of scientific packages.
It's also a virtual environment manager and also a package manager.
Anaconda helps us to solve some situations. For example,
when you would like to have multiple versions of Python or multiple
versions of some packages in separate environments,
it's very useful for dependency management. You can install,
uninstall, and update the packages.
Anaconda can handle library dependencies outside of Python packages
and it is very easy to share Anaconda environments.
In my experience. Uh,
there are disadvantages of Anaconda as well,
and that is that the environments, uh, may break sometimes.
And when the environment gets too weak,
follow the dependencies by Anaconda gets, uh, very slow.
In these situations, it may help to use pip.
PIP is a Python package manager.
It is just for Python and it is a default Python package manager.
And, uh, when you want to use PIP and Python virtual environment together,
you have to use another package, for example.
Now let's go to explore our Python environment and install our
packages. What we need, it is nothing complicated.
We just use a few basic commands.
Now let's launch our Jupiter and new terminal.
Okay, here we are.
Now let's print more information about our Anacondas base environment.
We can do this with Conda info command.
We see that the base environment is the currently active environment.
We see its location. We see location of the configuration file,
Anaconda version, it version,
and we also see the default directory where new
environments will be created and few other information.
Now let's check if we have, uh, any other environments available.
We can check this with conduct and list command.
No base environment is the only one.
Now let's print its installed packages.
We can do this with Conda list command.
It'll take some time depending on the size of the environment.
That means number of packages
we have now the output
and this environment is really big. We see the name of the package,
its version build and channel.
Now let's go to the uh, website for Jupyter contributors extensions.
Uh,
we can see here installation instructions and the list of provided extensions.
We'll install the favorite one, which is table of contents.
After this video, uh,
feel free to install and explore any other extensions which you like.
But please be aware that these are contributors extensions.
That means you can encounter some bug dependency issues or
some may work and some not.
There are just few steps how to do it. First we have to install its package.
We will use PIP for this.
You can pass the command, uh, with shift insert
inside the terminal
and we will use a specific version of this package because the
newest version, uh, was a little bit broken.
The table of contact extension didn't work Here.
We'll install the version of 0.5 0.1.
Okay, it seems it has been successful. No errors.
Now the second step is to install JavaScript and CSS files.
Let's copy this command.
Okay, this seems it was okay as well.
What do we see here?
We see all the extensions, uh,
which were installed and what is important we see also
is installation directories.
And the third step is to activate selected extensions.
So now let's activate our table of content.
This is the way how to do it. Uh,
Jupyter NB extension enable then name of the extension
slash main and it seems okay.
Now let's open the notebook.
Go to folder for module number three and open this one.
And we are here and it seems the table of content is working.
This is a very useful extension because it allows you to very
quickly navigate through very long notebooks.
We can activate one extension more.
Let's activate the code folding extension.
Okay, it has been successfully activated. Now refresh the notebook,
uh, here in the second cell we can see it.
Okay, it seems it's working.
Now let's activate some third extension. We
can activate height, input extension.
Let's refresh the notebook.
And what this extension does, it, uh, hides, uh,
the code of some cell. For example,
here I have printed out the data frame, but I can hide its input.
Okay, that was in our next video.
We'll learn about Jupyter Notebooks configuration.