The latest version of wxPython doesn't support the wxversion module. Instead the information is available as wx.version.
Is there any suggested work around to this? Thanks!
My environment is Ubuntu 20.04 LTS, pyenv, python 3.8.3, python 2.7.18, wxPython 4.1.0
$ apt-cache policy playonlinux
playonlinux:
Installed: 4.3.4-1ubuntu1
Candidate: 4.3.4-1ubuntu1
Version table:
*** 4.3.4-1ubuntu1 500
500 http://us.archive.ubuntu.com/ubuntu focal/multiverse amd64 Packages
500 http://us.archive.ubuntu.com/ubuntu focal/multiverse i386 Packages
100 /var/lib/dpkg/status
$ which playonlinux
/usr/bin/playonlinux
# *** note: i'm using pyenv ***
$ pyenv local 2.7.18
$ which python2
/home/dever/.pyenv/shims/python2
$ python2 -V
Python 2.7.18
$ pyenv local 3.8.3
$ which python3
/home/dever/.pyenv/shims/python3
$ python3 -V
Python 3.8.3
Installed Python 3.8.3 configuration has wxPython 4.1.0
$ python
Python 3.8.3 (default, Jul 16 2020, 20:35:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> print(wx.version)
<function version at 0x7ff77d3cbd30>
>>> print(wx.version())
4.1.0 gtk3 (phoenix) wxWidgets 3.1.4
>>> quit()
Consequently, the playonlinux command fails with this error:
$ playonlinux
Looking for python... 3.8.3 - skipped
Looking for python2.7... 2.7.18 - Traceback (most recent call last):
File "/usr/share/playonlinux/python/check_python.py", line 1, in <module>
import os, wxversion
ImportError: No module named wxversion
failed tests
Looking for python2.6...
Looking for python2... 2.7.18 - Traceback (most recent call last):
File "/usr/share/playonlinux/python/check_python.py", line 1, in <module>
import os, wxversion
ImportError: No module named wxversion
failed tests
Please install python before trying to run this program
NOTE: For those struggling to install wxPython on Ubuntu 20.04 LTS due to GTK+ error *** Could not run GTK+ test program, checking why...
Try this command (found here: https://wxpython.org/pages/downloads/)
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04 wxPython
For additional context also see: https://discuss.wxpython.org/t/where-to-obtain-wxversion-py/28752
playonlinux installed initially as follows, but reinstalled with standard repository on Ubuntu 20.04 LTS (i upgraded from 19.10):
The version of playonlinux I'm running is for Ubuntu 18.04 (Bionic Version) downloaded from here: https://www.playonlinux.com/en/download.html
For the Bionic version
Type the following commands:
wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
sudo wget http://deb.playonlinux.com/playonlinux_bionic.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt-get update
sudo apt-get install playonlinux
Maybe playonlinux is superseded by the flatpak version?
Looking at the Github link on https://www.playonlinux.com takes you to https://github.com/PhoenicisOrg/ which suggest that perhaps the solution is to migrate to the flatpak version: