How do I find the openpyxl version number
Solution 1
Assuming you have imported openpyxl
, openpyxl.__version__
gives the version number.
Solution 2
You can also find the version from an installer package if you used one. I installed openpyxl using pip3, so pip3 list
at the shell prompt will show the current version for all pip3 installed packages. You may need to use pip list
if that is what was used on your machine.
Package Version
---------------------- ----------
astroid 2.3.3
certifi 2019.11.28
chardet 3.0.4
click 7.1.1
dnspython 1.16.0
et-xmlfile 1.0.1
idna 2.9
isort 4.3.21
jdcal 1.4.1
lazy-object-proxy 1.4.3
lml 0.0.9
mccabe 0.6.1
mysql-connector-python 8.0.19
openpyxl 3.0.3
Related videos on Youtube
cup
A lot of my time is spent cleaning up the mess left by the trailblazers and trying to wedge in new functionality into old code.
Updated on May 30, 2022Comments
-
cup over 1 year
I was given a PC with anaconda already installed. I have got no idea which version it is other than 3.
Whenever I try to lookup techniques on openpyxl, there seem to be several, depending on the version of openpyxl. One answer will say do it one way for version 1.8, another will say do it some other way for 2.5.
How do I find out which version of openpyxl is installed so I can avoid trying techniques that either no longer work or only work for later versions.
I've looked through https://openpyxl.readthedocs.io/en/stable/api/openpyxl.html . There doesn't seem to be a function that returns the version number.
-
cup over 4 yearsTook a while to get it going - had to use
__version__
instead ofopenpyxl.__version__
-
paxdiablo almost 4 years@cup, that's probably because you use something like
from openpyxl import __version__
rather thanimport openpyxl
. -
cup almost 4 years@paxdiablo - you're right - I had a from openpyxl import *
-
cup over 3 yearsOn some systems like Anaconda3, you have to use pip list since pip3 is called pip.
-
Larry W over 3 years@cup - good point. I edited my comment to note that the pip version may vary. Thanks.