How to Check SciPy Version

Shiv Yadav Feb 02, 2024
How to Check SciPy Version

This article will look into how to check the scipy version.

Check the SciPy Version

Before we check the installed version of SciPy, first make sure that you have installed Python already, and for managing packages, you must install the latest version of pip.

There are many ways to check the version of SciPy (make sure you have installed scipy). We can check the version using the command line (in Windows, Linux, or macOS), but we will only look into checking the version in Windows OS.

In Windows, we can check the version with the help of the pip manager. We can check it from the Windows terminal, Jupyter Notebook, or Anaconda.

In the Windows terminal, you can use the following code to check the version:

pip show scipy

Output:

Windows Terminal - pip show scipy

You can see every detail about the SciPy library and its version. You can even use this command which is the same as the previous one:

pip3 show scipy

Here, pip3 is the package manager for Python 3 or greater versions.

Output:

Windows Terminal - pip3 show scipy

You can check all the libraries that are installed on your system using pip, and you can search for scipy there:

pip list

Output:

Windows Terminal - pip list

In this list, you can search for the scipy library if you have installed many libraries.

SciPy Version

We can also check the version in the Python code editor. For this task, we used a Jupyter notebook.

Scipy Version in Jupyter Notebook

Let’s understand the above image. First, before using any library, we have to import the SciPy library:

import scipy

Then use that imported library for whatever task you want. Here, we are only checking its version (there is a double underscore before and after the version below):

scipy.__version__

We can also check the version by using the pip command in the Jupyter notebook:

!pip show scipy

An exclamation mark ! is used here to run the code in a command shell rather than in a notebook command.

In this way, we can check the version of SciPy.

Author: Shiv Yadav
Shiv Yadav avatar Shiv Yadav avatar

Shiv is a self-driven and passionate Machine learning Learner who is innovative in application design, development, testing, and deployment and provides program requirements into sustainable advanced technical solutions through JavaScript, Python, and other programs for continuous improvement of AI technologies.

LinkedIn