I have Python and WxPython installed. I want to check what is the version of WxPython installed.
我安装了Python和WxPython。我想检查一下WxPython的安装版本。
Didn't find the answer on https://wxpython.org/
在https://wxpython.org/上找不到答案
2 个解决方案
#1
8
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:
如果你想在命令行上使用单线程而不使用pip:
python -c "import wx;print wx.__version__"
#2
5
Just like you would with every other Python library:
就像你对其他所有Python库一样:
pip show WxPython
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.
由于我没有安装此库,我只能建议某些库也提供__version__或version()属性。
EDIT: @nepix32's answer provides the way it was implemented in WxPython
.
编辑:@nepix32的答案提供了在WxPython中实现的方式。
#1
8
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:
如果你想在命令行上使用单线程而不使用pip:
python -c "import wx;print wx.__version__"
#2
5
Just like you would with every other Python library:
就像你对其他所有Python库一样:
pip show WxPython
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.
由于我没有安装此库,我只能建议某些库也提供__version__或version()属性。
EDIT: @nepix32's answer provides the way it was implemented in WxPython
.
编辑:@nepix32的答案提供了在WxPython中实现的方式。