sciapp / gr

GR framework: a graphics library for visualisation applications
Other
328 stars 54 forks source link

Getting started not working on debian #83

Open dboeckenhoff opened 5 years ago

dboeckenhoff commented 5 years ago

When running the example python -c "from gr.pygr import mlab; mlab.plot(range(100), lambda x: x**2)" on debian in python 3.5, I get the following warnings:

/home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt) /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: no version information available (required by /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt) /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt) /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: no version information available (required by /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt) /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: no version information available (required by /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt) /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt: /usr/lib/x86_64-linux-gnu/libQt5Network.so.5: no version information available (required by /home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/bin/gksqt) connect: Connection refused GKS: can't connect to GKS socket application Did you start 'gksqt'?

GKS: Open failed in routine OPEN_WS GKS: GKS not in proper state. GKS must be either in the state WSOP or WSAC in routine ACTIVATE_WS

, followed by the following stack trace:

Traceback (most recent call last): File "", line 1, in File "/home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/pygr/mlab.py", line 38, in wrapper return func(*args, *kwargs) File "/home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/pygr/mlab.py", line 76, in plot _plot_data(kind='line') File "/home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/pygr/mlab.py", line 1872, in _plot_data _set_viewport(kind, _plt.kwargs['subplot']) File "/home/IPP-HGW/dboe/anaconda2/envs/py35/lib/python3.6/site-packages/gr/pygr/mlab.py", line 1449, in _set_viewport dpi = pixel_width / metric_width 0.0254 ZeroDivisionError: float division by zero

danielkaiser commented 5 years ago

On Linux systems GR uses the Qt based output gksqt by default. Based on the error messages I would say there is no compatible libqt5 installed on your system and the libstdc++ does not provide the required CXXABI version 1.3.9.

To avoid this problem you might try to use a different workstation type, for example use the x11 output instead of gksqt:

export GKS_WSTYPE=x11
python -i -c "from gr.pygr import mlab; mlab.plot(range(100), lambda x: x**2)"

If you want to use the qt output please make sure that you have the Qt5 libraries installed on your machine. As we built the debian binary distribution of GR on debian stable you probably need at least debian stable to run them. If you are using an older debian version you can build the GR runtime from source:

git clone https://github.com/sciapp/gr.git
sudo make self