Issue with wxPython under Linux Mint 18

1 post / 0 new
christiankral
Offline
Joined: 2011-10-14
Issue with wxPython under Linux Mint 18

I installed JModelica on my 64 bit Linux Mint 18 machine. Linux Mint 18 is based on Ubuntu 16.04.

The installation worked without complaints. The demos of subsection 2.3.3 "Testing JModelica.org" work fine without complaints.

In section 3.4 "Checking your Installtion" I performed

import pyjmi
pyjmi.check_packages()

The result is

Performing pymodelica/pyjmi package check
=========================================

Platform...................... linux2

Python version:............... 2.7.12

pymodelica/pyjmi version:..... unknown

Dependencies:

Package Version
------- -------
assimulo...................... --
casadi........................ 2.1.0+
Cython........................ 0.23.4
jpype......................... --
lxml.......................... 3.5.0
matplotlib.................... 1.5.3
nose.......................... 1.3.7
numpy......................... 1.11.2
scipy......................... 0.18.1
wxPython...................... -- Package missing - Warning issued, see details below

Warnings
--------

-- The package wxPython could not be found. This package is needed to be able to use the plot-GUI.

So a problem with wxPython seems to be detected. When I check my Python installation it shows that version 3.0.2.0 of wxPython is installed.

> pip list

...
wxPython (3.0.2.0)
wxPython-common (3.0.2.0)
...

As there is wxPython 2.8 recommended in the installation instructions this may be conflict. However, the Plot GUI according to chapter 7 requires wxPython. At the beginning there is no problem starting the GUI:

from pyjmi.common.plotting import plot_gui # or pyfmi.common.plotting import plot_gui
plot_gui.startGUI()

The GUI is opened and I can open results, plot curves, etc. When it comes to Fig. 7.8 "Moving Plot Figure" an error is triggered, which appears in the IPython interface:

('Found child in top siblings, ', 'Modelica_Mechanics_Rotational_Examples_First_result.txt')
---------------------------------------------------------------------------
PyAssertionError Traceback (most recent call last)
/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/lib/agw/aui/auibook.pyc in OnLeftUp(self, event)
2006 self._is_dragging = False
2007 if self._drag_image:
-> 2008 self._drag_image.EndDrag()
2009 del self._drag_image
2010 self._drag_image = None

/usr/lib/python2.7/dist-packages/wx-3.0-gtk2/wx/_controls.pyc in EndDrag(*args, **kwargs)
6364 def EndDrag(*args, **kwargs):
6365 """EndDrag(self) -> bool"""
-> 6366 return _controls_.DragImage_EndDrag(*args, **kwargs)
6367
6368 def Move(*args, **kwargs):

PyAssertionError: C++ assertion "!wxMouseCapture::stack.empty()" failed at ../src/common/wincmn.cpp(3319) in ReleaseMouse(): Releasing mouse capture but capture stack empty?
Segmentation fault

Possibly this error is caued due to the lack of backwards compatibility of wxPython, but I do not know... Does anyone have an idea what can be done. wxPython 3.0.2.0 was installed directly from the standard Linux Mint (Ubuntu) repository.