How do I check the version of wxPython installed on my server?


I have Python and WxPython installed.
I want to check what is the version of WxPython installed.

Didn’t find the answer on

Asked By: ban



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.

Answered By: DeepSpace

Do as follows:

>>> import wx
>>> wx.version()
' msw (classic)'
>>> wx.__version__

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__)"
Answered By: nepix32
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.