Source

Finding the module version

Hi there folks. I know I have not been active recently and it was because I was not in town. I was in Canada. So this post will be short. In this post i will show you how you can find the version number of any python module. Sometimes you need to find the version number in order to know whether you have the desired version of the module or not. So here is the trick.

  1. First of all launch python:
$ python
  1. Import the module which in our case is requests:
>>> import requests
  1. Lastly type this:
>>> requests.__version__
'1.2.3'

So I hope you got the trick. If you have any questions then feel free to post them below and stay tuned for the next post.

Newsletter

×

If you liked what you read then I am sure you will enjoy a newsletter of the content I create. I send it out every other month. It contains new stuff that I make, links I find interesting on the web, and occasional discount coupons for my book. Join the 5000+ other people who receive my newsletter:

I send out the newsletter once every other month. No spam, I promise + you can unsubscribe at anytime

✍️ Comments

Philipp

By the way, this is just a convention. If you want your own modules to have a useful version, simply assign a string (if possible using the semantic version format, see http://semver.org/ ) to module .

Say something

Send me an email when someone comments on this post.

Thank you!

Your comment has been submitted and will be published once it has been approved. 😊

OK