Now we will install the python libraries in anaconda. We will install “numpy” and pandas and we will also check the version of the libraries installed. For this, we need to open the anaconda navigator.
If you remember we have created a new file named as “new2” (you may have created by some other name)
Make sure in the application tab you have selected the file which you have created earlier as in my case its named as new2 also circled with a red circle. Next, we are going to use Jupyter Lab. So click the launch button under Jupyter Lab.
At the time of writing this article, Jupiter has a version (mentioned above the launch circled red) 1.2.6. It may be different in your case so it is something that needs not to be worried. So after clicking on the launch button, it will open a new tab on your default browser (as in my case its google chrome). The opening of a window in browser.
A window similar to the shown above will be opened in your browser. In the above image, you can see the multiple applications like Python 3 Notebook and Python 3 Console and some other not shown in the image but can be seen in the browser. Python 3 notebook and python 3 console has different applications. Today we are going to use Python 3 Notebook. So click on the python 3 tab as shown in the red circle. A new window will be shown something similar to mentioned below
So we are going to write code in the browser. First, we are going to import the libraries of python as mentioned above numpy and pandas.
First, we will do with numpy but before that, you can see on that at the end of the top row Code is mentioned. This is for if we are going to write some code. You can also select other options in the drop-down menu like “Markdown” or “Raw”. I will give 1 instance of it. Let’s say we choose the option of “Markdown”. So after choosing the option markdown, I write
- ### Machine Learning with Python
The more you use # the more it will have bigger in size. So if you write the above statement with four hashtags it will have bigger font size and it will not be the part of code.
I have written ### Machine Learning with Python and you can see the output but make sure that Markdown is selected from the drop-down menu otherwise it will be treated as a comment in python.
So next we going to import numpy as np but before that, we need to install it. So for the installation purpose we will go back to anaconda navigation and click on the environment tab. Make sure the Environments tab is clicked and in my case new2 is selected (in your case it may be different) and from the drop-down menu Not installed is selected and in the search box write numpy
So we need to download the numpy circled in red, therefore, click on it and click on apply as mentioned below
It will start downloading the required library or package.
Now once again we are going to browser to confirm the installation of numpy and check the version of numpy. So once again open your browser and write the following code
- import numpy as np
It will produce the output and display their version of numpy installed on your system
In my case the version 1.18.1. It may be different in your case. This needs not to be worried. I leave the installation of pandas up to you.