How do I check the version of wxPython installed on my server?
Question:
I have Python and WxPython installed.
I want to check what is the version of WxPython installed.
Didn’t find the answer on https://wxpython.org/
Answers:
Just like you would with every other Python library:
pip show WxPython
As I don’t have this library installed, I can only suggest that some libraries also provide a __version__
or version()
attribute.
EDIT: @nepix32’s answer provides the way it was implemented in WxPython
.
Do as follows:
>>> import wx
>>> wx.version()
'3.0.2.0 msw (classic)'
>>> wx.__version__
'3.0.2.0'
If you want a one-liner on the command-line without using pip (Python 2.7):
python -c "import wx;print wx.__version__"
Of course in 2022 (Python 3, Python 2 is long gone now) is works like this:
python -c "import wx;print(wx.__version__)"
I have Python and WxPython installed.
I want to check what is the version of WxPython installed.
Didn’t find the answer on https://wxpython.org/
Just like you would with every other Python library:
pip show WxPython
As I don’t have this library installed, I can only suggest that some libraries also provide a __version__
or version()
attribute.
EDIT: @nepix32’s answer provides the way it was implemented in WxPython
.
Do as follows:
>>> import wx
>>> wx.version()
'3.0.2.0 msw (classic)'
>>> wx.__version__
'3.0.2.0'
If you want a one-liner on the command-line without using pip (Python 2.7):
python -c "import wx;print wx.__version__"
Of course in 2022 (Python 3, Python 2 is long gone now) is works like this:
python -c "import wx;print(wx.__version__)"