Open In App

How To Uninstall Specific Version In Numpy

Last Updated : 14 Feb, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

NumPy is a fundamental library in Python programming. In the development of projects, versioning allows development teams to keep track of changes they make to the project code. The changes could be functions, features, bug fixes, and more.

So that is managing library versions becomes crucial. With this article let’s understand the methods to Uninstall Specific Version In Numpy.

Uninstalling Specific Version Of NumPy

To uninstall a specific version of NumPy, below are some methods or approaches for uninstalling a specific verions of NumPy.

Approach 1: Uninstall the Specific version

Use the ‘pip uninstall numpy’ Command for uninstall the existing version. Below are some of the steps, which helps in uninsatlling a specific version of NumPy:

Step 1: Open Terminal or Command Prompt in your OS

Step 2: Check the currently installed NumPy Version

  • Before updating, it is very helpful to know the currently installed version of NumPy in Python. You can check the currently installed version using a specific code snippet in a Python environment: with command:
pip show numpy

Output:

Screenshot-from-2024-02-13-18-52-16

Step 3: Uninstall Specific Version

Use the following command to uninstall a specific/desired version

pip uninstall numpy=='desired version'

Output:

Screenshot-from-2024-02-13-18-54-12

Here you can see that we successfully uninstalled a specific version of NumPy. Let us also understand it with a few more approaches.

Approach 2 – Using the ‘–force-reinstall’ Command

Another way to Uninstall a specific version, is when their is an existing version. The command ‘–force-reinstall’ is used to first delete the existing version and then install a specific version.

Step 1: Open Terminal or Command Prompt in your OS

Step 2: Use ‘–force-reinstall’ command for uninstallation of existing version and installation of a specific version.

pip install --force-reinstall numpy==1.24.4

Output:

Screenshot-from-2024-02-13-18-58-20

Step 3: Verify the Installation

To Confirm the installation of Specific version use ‘pip show numpy’.

Approach 3 – Using Command ‘–ignore-installed’

The next approach allows us to ignore the existing version. The ‘–ignore-installed’ command helps in ignoring the already installed version or package. It plays a crucial role, while using virtual environment.

pip install --ignore-installed numpy==1.23.5

Output:

Screenshot-from-2024-02-13-19-01-21

Conclusion

In the end, mastering the skills of uninstalling specific versions of NumPy is essential for maintaining the Python environment well structured. The Python developers get updated and can utilize the service in the best way. The concept of versioning, utilizing version specifiers, and uninstallation process empower developer’s in library management and python integrated environment management.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads