Last modified: Jun 18, 2025 By Alexander Williams
How to Uninstall NumPy in Python
NumPy is a popular library for numerical computing in Python. Sometimes, you may need to uninstall it. This guide explains how.
Why Uninstall NumPy?
You might need to uninstall NumPy to fix conflicts, free up space, or switch versions. It's a simple process.
Check if NumPy is Installed
Before uninstalling, verify if NumPy is installed. Use the pip show
command.
pip show numpy
Name: numpy
Version: 1.21.0
Summary: NumPy is the fundamental package for array computing with Python.
If NumPy is installed, you'll see its details. If not, you'll get a "not found" message.
Uninstall NumPy Using pip
The easiest way to uninstall NumPy is with pip uninstall
. Run this command.
pip uninstall numpy
Uninstalling numpy-1.21.0:
Would remove:
/path/to/numpy
Proceed (y/n)? y
Successfully uninstalled numpy-1.21.0
Confirm the uninstall by typing y and pressing Enter. NumPy will be removed.
Uninstall NumPy in a Virtual Environment
If you're using a virtual environment, activate it first. Then run the uninstall command.
Learn more about managing virtual environments in our guide on How to Uninstall Virtualenv.
Verify NumPy is Uninstalled
After uninstalling, check if NumPy is still present. Use pip list
or try importing it in Python.
pip list | grep numpy
No output means NumPy is uninstalled. You can also try importing it.
python -c "import numpy"
ModuleNotFoundError: No module named 'numpy'
Common Issues and Solutions
Sometimes, you might face permission errors. Use sudo
on Linux/Mac or run as admin on Windows.
For more Python library management tips, see How to Uninstall Python Libraries.
Reinstall NumPy if Needed
If you uninstalled NumPy by mistake, reinstall it easily.
pip install numpy
Conclusion
Uninstalling NumPy is straightforward with pip uninstall
. Always verify the removal. For more Python help, check our guide on How to Uninstall Python.
Remember, managing packages properly keeps your Python environment clean and efficient.