Last modified: Jun 21, 2025 By Alexander Williams
How to Uninstall Altair in Python
Altair is a popular Python library for statistical visualization. Sometimes, you may need to uninstall it. This guide will show you how.
Why Uninstall Altair?
You might want to uninstall Altair for several reasons. Maybe you need a different version. Or you're cleaning up your Python environment.
Whatever the reason, uninstalling Altair is simple. Follow these steps.
Check if Altair is Installed
First, verify if Altair is installed. Use the pip show
command.
pip show altair
If Altair is installed, you'll see its details. If not, you'll get a "not found" message.
Uninstall Altair Using Pip
The easiest way to uninstall Altair is with pip uninstall
.
pip uninstall altair
Confirm the uninstallation when prompted. This removes Altair from your Python environment.
Verify the Uninstallation
After uninstalling, check if Altair is gone. Run pip show altair
again.
Package 'altair' not found
This message means Altair was successfully uninstalled.
Uninstall Altair with Dependencies
Altair may have dependencies. To remove them too, use the --yes
flag.
pip uninstall altair --yes
This skips the confirmation prompt. It also removes unused dependencies.
Common Issues and Fixes
Sometimes, uninstalling Altair may fail. Here are some common issues and fixes.
Permission Errors
If you get permission errors, try using sudo
(Linux/Mac).
sudo pip uninstall altair
On Windows, run Command Prompt as Administrator.
Altair Not Found
If pip can't find Altair, check the exact package name. It's case-sensitive.
Also, ensure you're using the right Python environment. This is common in virtual environments.
Uninstall Altair in Jupyter Notebook
To uninstall Altair in Jupyter, use the !
prefix.
!pip uninstall altair --yes
This runs the pip command directly in the notebook.
Alternative Uninstall Methods
If pip doesn't work, try these alternatives.
Using Conda
If you installed Altair with Conda, use this command.
conda remove altair
Conda will handle dependencies automatically.
Manual Uninstall
As a last resort, delete Altair manually. Find its installation folder and remove it.
Use pip show altair
to locate the folder. Then delete it.
Reinstall Altair After Uninstall
Need Altair again? Install it with pip.
pip install altair
This installs the latest version. For a specific version, add ==version
.
Conclusion
Uninstalling Altair in Python is straightforward. Use pip uninstall altair
for most cases.
For more complex setups, try Conda or manual removal. Always verify the uninstallation.
Need to uninstall other libraries? Check our guides on uninstalling Plotly or uninstalling OpenCV.
Happy coding!