How to Check Numpy Version in Python
How to Check Numpy Version in Python

How to Check Numpy Version in Python ? 5 Methods

Do you want to check numpy version after the installion on numpy on your system. Then this article is for you. In this entire post you will know various ways to check numpy version in Python.

Various Method to Check Numpy Version in Python

Method 1: Checking numpy version using two dot operators

Here you have to use two dot operator and word “version” just like below. It output the version of currently installed numpy.

import numpy as np
np.version.version
Checking numpy version using two dot operators
Checking numpy version using two dot operators

Method 2 : Two underlines in the beginning and in the end

You can use  __version__ to know the current version of the installed numpy array.

import numpy as np
np.__version__

"<yoastmark

Method 3: How to check the version of numpy in cmd

Just like you are writing code in your IDEs and outputting the numpy version. You can do so in command prompt also. Make sure that you have already installed numpy module.

Open your command prompt and type the following text and click on enter.

python -c "import numpy; print(numpy.__version__)"

You will get the version number

"<yoastmark

Method 4: Check numpy version using pip

You can use the pip show command to know the version of the numpy array. Copy and paste the command below to output the version number.

pip show numpy

"<yoastmark

Using this command you will get all the details about the python package like, Name,version, author ,summary ,location e.t.c which is very useful.

Method 5: Know numpy version with other modules.

There is also a way to know all the installed python pakages in your system. You will get module name and its version. Use the below command to get the all the modules name. Then look for the numpy and its version

pip list

 

END NOTES

These are various method I have compiled for you. You can use any method as per your convenience to check numpy version in python. If you ask me which one you should use  then it depends upon where are you coding. For example If I am using pycharm then I will use the first and second one and if in command prompt then method 3 and 4. And method 5 if you are using python shell.

Hope this article has completed your confusion on how to numpy version in python. If you have any other queries then you can contact us.

Source:

Numpy Offical Website

 

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for signup. A Confirmation Email has been sent to your Email Address.

Something went wrong.

 
Thank you For sharing.We appreciate your support. Don't Forget to LIKE and FOLLOW our SITE to keep UPDATED with Data Science Learner