Skip to content
Follow
Ubuntu Linux

How to Install Pandas on Ubuntu 24.04

Richard
Written by
Richard
Dec 12, 2024 Updated Aug 13, 2026 3 min read
How to Install Pandas on Ubuntu 24.04
How to Install Pandas on Ubuntu 24.04

Pandas is a popular Python library that helps you organize and clean up messy data using tables with rows and columns. Ubuntu 24.04 comes with Python 3.12 built right in, making it quick and easy to set up Pandas for your data projects.

You can install Pandas on your system in a couple of minutes using the terminal. The fastest way is running a simple command, or you can use Python’s package manager if you want to keep things isolated in a project folder.

⚡ Quick Answer

Install Pandas on Ubuntu 24.04 using `sudo apt update && sudo apt install python3-pandas` for the APT method, or `sudo apt install python3-pip && pip3 install pandas` for the pip method. Verify the installation by running `python3 -c “import pandas as pd; print(pd.__version__)”`.

Install Pandas APT

Install Pandas using APT.

APT provides a native package management system for Ubuntu 24.04, though the provided release might lag behind the most recent version of Pandas. Start by refreshing the local package index to ensure you pull from the latest available repositories. Run `sudo apt update` to refresh the list.

🐧Bash / Shell
sudo apt update
sudo apt install python3-pandas

Follow that up by executing `sudo apt install python3-pandas` to pull down the library and its required dependencies. Confirm the installation by executing:

💻Code
python3 -c "import pandas as pd; print(pd.__version__)"

Execution of this command displays the active version number.

Install pandas using pip

Pip pulls in newer releases of Pandas on Ubuntu 24.04 than the APT method typically supplies. Setup begins by installing pip, which handles Python package distribution. System preparation allows pip to fetch Pandas and target specific versions.

First, install pip on Ubuntu.

🐧Bash / Shell
sudo apt update
sudo apt install python3-pip

Following pip installation, import the pandas module with this command:

💻Code
python
import pandas as pd

Verification of the pip installation requires running the command below.

💻Code
print(pd.__version__)

The terminal outputs the pandas version number upon successful completion.

Install pandas using a Python virtual environment

Virtual environments isolate Python projects to prevent dependency conflicts on Ubuntu 24.04. This isolation protects the global system Python installation from third-party package clashes. Setup requires verifying pip availability before deploying the virtual environment package.

First, make sure Python pip is installed and then install its virtual environment package.

🐧Bash / Shell
sudo apt install python3-pip
sudo apt install virtualenv

Next, create a new project named project_env within the virtual environment.

💻Code
virtualenv project_env

Then, activate the environment.

💻Code
source project_env/bin/activate

After that, install pandas.

💻Code
pip3 install pandas

Now, import the pandas modules.

💻Code
python
import pandas as pd

Check where pandas is installed.

💻Code
print(pd.__version__)

Once finished, deactivate the virtual environment by running the command below.

💻Code
deactivate

Ubuntu 24.04 offers multiple paths for setting up Pandas depending on project requirements.

Conclusion:

Reviewing these deployment strategies helps developers select the ideal installation method for Ubuntu 24.04. Key takeaways include:

  • APT Package Manager: Quick and straightforward, though it may not provide the latest version.
  • Pip Package Manager: Offers flexibility in managing packages and ensures you have access to the latest updates.
  • Python Virtual Environment: Ideal for project-specific installations, preventing conflicts between package versions.
  • Verification: Always verify the installation by checking the Pandas version to ensure it is installed and functioning.

Pandas remains essential for data analysis, and proper installation ensures optimal performance on Ubuntu 24.04. Utilizing `pip` guarantees access to cutting-edge features for demanding data workflows.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

Add Multiple Clocks to Ubuntu Linux Top Bar
Ubuntu Linux Add Multiple Clocks to Ubuntu Linux Top Bar
How to Install Let's Chat on Ubuntu Linux
Ubuntu Linux How to Install Let's Chat on Ubuntu Linux
How to Change Screen Brightness in Ubuntu Linux
Ubuntu Linux How to Change Screen Brightness in Ubuntu Linux
Change Power Button Behavior in Ubuntu Linux
Ubuntu Linux Change Power Button Behavior in Ubuntu Linux

No comments yet — be the first to share your thoughts!

Leave a Comment

Your email address will not be published. Required fields are marked *