Menu
Buy VPS
Dedicated Server
Payments
User

DropVPS Team

Writer: Amber Song

How to install seaborn on Debian 13

How to install seaborn on Debian 13

Publication Date

Category

Articles

Reading Time

2 Min

Table of Contents

Seaborn is a Python library for creating statistical charts and visualizing data. It works with Matplotlib and pandas, making it useful for data analysis and machine learning.

Step 1: Update Debian Packages

Before installing Seaborn, update your Debian package lists to ensure your system has the latest available package information.

sudo apt update

Step 2: Install Python and pip

To install Seaborn on Debian 13, install Python, pip, and the virtual environment package to prepare your system for data visualization.

sudo apt install python3 python3-pip python3-venv -y

Step 3: Check Python Installation

Verify that Python and pip are installed correctly on Debian 13 before proceeding with the Seaborn installation.

python3 --version
python3 -m pip --version

Step 4: Create a Virtual Environment

Creating a Python virtual environment on Debian 13 keeps Seaborn and its dependencies isolated, helping prevent package conflicts with other Python projects.

mkdir seaborn-project
cd seaborn-project
python3 -m venv .venv

Activate the environment:

source .venv/bin/activate

Step 5: Install Seaborn

Install Seaborn on Debian 13 using pip inside your activated virtual environment to download the library and its required dependencies.

python -m pip install seaborn

Step 6: Verify the Installation

After installing Seaborn on Debian 13, check the library version to confirm that Python can import it without errors.

python -c "import seaborn as sns; print(sns.__version__)"

Step 7: Install Matplotlib and pandas

To support Seaborn data visualization on Debian 13, install Matplotlib for chart rendering and pandas for data manipulation and analysis.

python -m pip install matplotlib pandas

Step 8: Create Your First Seaborn Chart

Create your first Seaborn chart on Debian 13 using Python to visualize the relationship between restaurant bills and tips.

Create a file named main.py and add the following code:

import seaborn as sns
import matplotlib.pyplot as plt

tips = sns.load_dataset("tips")
sns.scatterplot(data=tips, x="total_bill", y="tip")

plt.title("Total Bill vs Tip")
plt.savefig("seaborn_chart.png", dpi=300, bbox_inches="tight")

Run the script:

python main.py

Step 9: Troubleshoot Common Installation Errors

If Seaborn fails to install, make sure your virtual environment is activated and upgrade pip before trying again.If Debian reports an externally managed environment error, create and activate a virtual environment instead of installing packages globally with pip.

python -m pip install --upgrade pip
python -m pip install seaborn
Linux VPS

Follow DropVPS on Google

Add DropVPS as a preferred source to see our latest VPS guides and tutorials surfaced first in Google Search and AI Overviews.

๐ŸงLinux VPS

Need a Linux Server for This?

Run Debian, Ubuntu, or any Linux distro on DropVPS โ€” fast NVMe SSD, full root access, and 24/7 support. Perfect for everything you just read.

  • Full Root Access
  • Debian & Ubuntu Ready
  • 99.99% Uptime
  • 24/7 Support
Get Linux VPS โ†’

No commitment ยท Cancel anytime

U
Loading...

Related Posts