WEBVTT - This file was automatically generated by VIMEO

0
00:00:07.940 --> 00:00:08.660
Hi.

1
00:00:08.660 --> 00:00:13.000
In this video we'll install a few useful Jupyter extensions,

2
00:00:13.530 --> 00:00:16.040
which will simplify our work with the notebooks.

3
00:00:16.540 --> 00:00:18.770
We have to install few packages.

4
00:00:19.030 --> 00:00:23.530
But first I would like to tell you a little bit about the basics on how to

5
00:00:23.530 --> 00:00:26.090
manage Python virtual environments and packages.

6
00:00:27.940 --> 00:00:30.720
As I mentioned to you in our previous video,

7
00:00:31.820 --> 00:00:35.680
we have Anaconda installed and we are using its space environment.

8
00:00:36.670 --> 00:00:39.190
Anaconda is basically a Python distribution,

9
00:00:39.640 --> 00:00:42.630
which provided a lot of scientific packages.

10
00:00:43.640 --> 00:00:47.850
It's also a virtual environment manager and also a package manager.

11
00:00:49.460 --> 00:00:53.640
Anaconda helps us to solve some situations. For example,

12
00:00:53.750 --> 00:00:58.440
when you would like to have multiple versions of Python or multiple

13
00:00:58.440 --> 00:01:01.640
versions of some packages in separate environments,

14
00:01:03.340 --> 00:01:08.130
it's very useful for dependency management. You can install,

15
00:01:08.200 --> 00:01:10.050
uninstall, and update the packages.

16
00:01:11.970 --> 00:01:16.610
Anaconda can handle library dependencies outside of Python packages

17
00:01:17.830 --> 00:01:20.810
and it is very easy to share Anaconda environments.

18
00:01:22.980 --> 00:01:24.920
In my experience. Uh,

19
00:01:24.970 --> 00:01:28.360
there are disadvantages of Anaconda as well,

20
00:01:29.710 --> 00:01:34.690
and that is that the environments, uh, may break sometimes.

21
00:01:36.010 --> 00:01:38.110
And when the environment gets too weak,

22
00:01:38.530 --> 00:01:42.390
follow the dependencies by Anaconda gets, uh, very slow.

23
00:01:44.220 --> 00:01:47.080
In these situations, it may help to use pip.

24
00:01:47.890 --> 00:01:49.790
PIP is a Python package manager.

25
00:01:50.450 --> 00:01:55.150
It is just for Python and it is a default Python package manager.

26
00:01:56.630 --> 00:02:01.290
And, uh, when you want to use PIP and Python virtual environment together,

27
00:02:01.710 --> 00:02:04.690
you have to use another package, for example.

28
00:02:07.600 --> 00:02:12.140
Now let's go to explore our Python environment and install our

29
00:02:12.140 --> 00:02:16.310
packages. What we need, it is nothing complicated.

30
00:02:16.730 --> 00:02:19.110
We just use a few basic commands.

31
00:02:20.060 --> 00:02:22.800
Now let's launch our Jupiter and new terminal.

32
00:02:26.270 --> 00:02:27.240
Okay, here we are.

33
00:02:28.470 --> 00:02:33.410
Now let's print more information about our Anacondas base environment.

34
00:02:34.270 --> 00:02:36.810
We can do this with Conda info command.

35
00:02:42.710 --> 00:02:46.330
We see that the base environment is the currently active environment.

36
00:02:46.630 --> 00:02:50.610
We see its location. We see location of the configuration file,

37
00:02:51.530 --> 00:02:53.970
Anaconda version, it version,

38
00:02:56.650 --> 00:03:01.320
and we also see the default directory where new

39
00:03:01.320 --> 00:03:05.020
environments will be created and few other information.

40
00:03:07.330 --> 00:03:10.870
Now let's check if we have, uh, any other environments available.

41
00:03:12.050 --> 00:03:14.870
We can check this with conduct and list command.

42
00:03:21.070 --> 00:03:23.010
No base environment is the only one.

43
00:03:23.970 --> 00:03:26.870
Now let's print its installed packages.

44
00:03:27.170 --> 00:03:29.470
We can do this with Conda list command.

45
00:03:36.640 --> 00:03:40.270
It'll take some time depending on the size of the environment.

46
00:03:40.740 --> 00:03:42.430
That means number of packages

47
00:03:45.900 --> 00:03:47.160
we have now the output

48
00:03:51.330 --> 00:03:55.940
and this environment is really big. We see the name of the package,

49
00:03:56.520 --> 00:03:58.620
its version build and channel.

50
00:04:04.570 --> 00:04:09.350
Now let's go to the uh, website for Jupyter contributors extensions.

51
00:04:11.310 --> 00:04:11.590
Uh,

52
00:04:11.590 --> 00:04:16.010
we can see here installation instructions and the list of provided extensions.

53
00:04:17.570 --> 00:04:21.480
We'll install the favorite one, which is table of contents.

54
00:04:23.340 --> 00:04:24.730
After this video, uh,

55
00:04:24.760 --> 00:04:28.930
feel free to install and explore any other extensions which you like.

56
00:04:29.750 --> 00:04:33.530
But please be aware that these are contributors extensions.

57
00:04:34.080 --> 00:04:38.810
That means you can encounter some bug dependency issues or

58
00:04:39.560 --> 00:04:41.090
some may work and some not.

59
00:04:52.120 --> 00:04:56.990
There are just few steps how to do it. First we have to install its package.

60
00:04:57.410 --> 00:04:58.830
We will use PIP for this.

61
00:05:02.260 --> 00:05:05.680
You can pass the command, uh, with shift insert

62
00:05:07.360 --> 00:05:08.220
inside the terminal

63
00:05:09.760 --> 00:05:13.660
and we will use a specific version of this package because the

64
00:05:14.440 --> 00:05:18.020
newest version, uh, was a little bit broken.

65
00:05:18.360 --> 00:05:20.860
The table of contact extension didn't work Here.

66
00:05:25.610 --> 00:05:28.240
We'll install the version of 0.5 0.1.

67
00:05:37.790 --> 00:05:41.760
Okay, it seems it has been successful. No errors.

68
00:05:43.630 --> 00:05:48.450
Now the second step is to install JavaScript and CSS files.

69
00:05:50.250 --> 00:05:51.320
Let's copy this command.

70
00:06:01.720 --> 00:06:04.050
Okay, this seems it was okay as well.

71
00:06:06.560 --> 00:06:07.450
What do we see here?

72
00:06:10.940 --> 00:06:12.760
We see all the extensions, uh,

73
00:06:12.760 --> 00:06:17.600
which were installed and what is important we see also

74
00:06:17.660 --> 00:06:19.120
is installation directories.

75
00:06:23.430 --> 00:06:27.610
And the third step is to activate selected extensions.

76
00:06:27.710 --> 00:06:30.410
So now let's activate our table of content.

77
00:06:34.410 --> 00:06:36.260
This is the way how to do it. Uh,

78
00:06:36.370 --> 00:06:40.980
Jupyter NB extension enable then name of the extension

79
00:06:41.190 --> 00:06:45.600
slash main and it seems okay.

80
00:06:46.180 --> 00:06:47.640
Now let's open the notebook.

81
00:06:50.120 --> 00:06:53.220
Go to folder for module number three and open this one.

82
00:07:00.900 --> 00:07:05.280
And we are here and it seems the table of content is working.

83
00:07:09.040 --> 00:07:13.860
This is a very useful extension because it allows you to very

84
00:07:13.860 --> 00:07:16.380
quickly navigate through very long notebooks.

85
00:07:23.840 --> 00:07:25.660
We can activate one extension more.

86
00:07:26.450 --> 00:07:31.050
Let's activate the code folding extension.

87
00:07:43.590 --> 00:07:48.440
Okay, it has been successfully activated. Now refresh the notebook,

88
00:07:54.010 --> 00:07:56.550
uh, here in the second cell we can see it.

89
00:07:59.390 --> 00:08:00.560
Okay, it seems it's working.

90
00:08:04.670 --> 00:08:08.370
Now let's activate some third extension. We

91
00:08:10.700 --> 00:08:13.020
can activate height, input extension.

92
00:08:24.800 --> 00:08:26.310
Let's refresh the notebook.

93
00:08:31.590 --> 00:08:35.490
And what this extension does, it, uh, hides, uh,

94
00:08:35.630 --> 00:08:38.690
the code of some cell. For example,

95
00:08:38.800 --> 00:08:43.410
here I have printed out the data frame, but I can hide its input.

96
00:08:47.960 --> 00:08:50.970
Okay, that was in our next video.

97
00:08:51.780 --> 00:08:55.650
We'll learn about Jupyter Notebooks configuration.
