How do I retrieve the version of Selenium currently installed, from Python

Question:

The title says it all, I want to programmatically get the version of Selenium I have installed on my Python environment.

Asked By: A.R.

||

Answers:

As simply as

>>> import selenium
>>> selenium.__version__
'2.37.2'

or for command line:

$ python -c "import selenium; print(selenium.__version__)"
2.37.2
Answered By: alko

Please Use below command to see the version of the libraries that would have been installed using pip

pip freeze

It will list all the used libraries with their versions.

Answered By: Abhishek

You can try:

  1. pip list

  2. conda list

or for example on MAC:

  1. brew list

And then check if and what version is in your installed package list.

For conda you might have different environments. Change it by conda activate myenv where myenv is the name of your second or more test environments.

Answered By: ZF007

Try using pip show selenium, that worked for me

Answered By: Mucheru

download pip to anaconda then pip install selenium through anaconda prompt

Answered By: Andromodos
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.