In this article, we are going to learn how to install Seaborn on MacOs With Pip in Python and verify if it was installed successfully on our system.
Pre-requisites to Install Seaborn
To install Seaborn we are going to use pip command so you will need to make sure you have pip installed on your machine. Depending on the version of Python, that you have installed on your machine, you must have pip or pip3 (for Python3) installed to run the Seabord installation command.To make sure the pip is up to date with the latest version you can run the below command.
pip install --upgrade pip #For Python3 , you can use pip3 also as given below: pip3 install --upgrade pip
How to install Seaborn on MacOS
You may need to use the sudo keyword to make sure the command is executed with administrator privileges. once you run the command, the terminal may ask you to type your administrator password before you could install this.On macOS operating system, installing Seaborn is very easy and you can do that by using the below steps:
- Open a terminal.
- Type the command as given below and press enters to start the installation.
pip install seaborn.
- For Python3, you can use pip3 also as given below: This will install the latest version on seaborn on the machine.
pip3 install seaborn
- If you have a specific version requirement then you can install that version by specifying the version. For this, you must know which version of seaborn you want to install. The pip command to install a specific version of seaborn is:
pip install seaborn==0.9.0
- For Python3, you can use pip3 also as given below:
pip3 install seaborn==0.9.0
How to check seaborn is installed successfully
After you install the seaborn by using the above pip command, you can verify the installation with the below steps:
- Open your terminal.
- Launch Python
- Try to import the seaborn in Python by typing
import seaborn as sb
If you have the installation done successfully then you should not see any error. Next, you can verify the version by writing next line as:
This should give you the version of seaborn that you just installed on your machine.