Installing packages in Python
One of the ways you can install packages is by using Anaconda’s command prompt. Simply open the Anaconda Prompt from the start menu and type the following command:
pip install pandas
Here’s the output:
Figure 2.14 – Installing packages in Anaconda
You can repeat the same process for the numpy
package. To do so, run the following code in your command prompt:
pip install numpy
Here’s the output:
Figure 2.15 – Installing the numpy package
Now, try running the following lines of code:
import pandas as pd import numpy as np
If the preceding commands were successful, then these two lines of code will run without any errors and you can now use the pandas
and numpy
packages. Note that you may run into the following error:
import pandas as pd Traceback (most recent call last): File "C:\Users\MEDIN\AppData\Local\Temp\ipykernel_13244...