Finding the version of the python package is very easy.

Image for posthttps://raw.githubusercontent.com/reubano/ongeza/master/ongeza.png

If you?re wondering how to know the version number of a specific python package, it?s as easy as 1, 2, 3.

I have miniconda with python 3.6.1, conda 4.3.22 & Win 10 64 bit. But the solution that I?m about to provide should work even for those who don?t use conda.

Step 1: Open up your terminal / Console / Command prompt.

Image for postI?ve activated my environment.

Step 2: Type ?python?.

Image for post

Step 3: Import your package and use .__version__ command as follows.

Image for post

Here, I imported sklearn and used .__version__ property to view it?s version.

import sklearn

print(sklearn.__version__)

That?s it. It must display the version of the package. This technique works for most of the packages.

Thanks for reading! 🙂 If you enjoyed this article, hit that heart button below ? Would mean a lot to me and it helps other people see the story.

14

No Responses

Write a response