Hello. I decided to do some exploration of pyqtgraph today on my Xubuntu 16.04 system with python 3.5.2 and PyQt5. I tried several methods of installing pyqtgraph but in all cases when I started python3 and typed "import pyqtgraph" I got a Segmentation fault and reported here and elsewhere. Being a stubborn sort (you get that way when you've been programming for 50 years) I couldn't give up. As I was looking at some of the examples I was a bit astonished to see code like:
>>> from pyqtgraph.Qt import QtCore, QtGui rather than what I was used to in my learning about PyQT5. So I started python3 again and typed: >>> import PyQt5 >>> import pyqtgraph and guess what? It didn't crash! I was able to run the examples and learn a bit about the workings of pyqtgraph. One additional note, in trying to execute the fractal.py example I got errors about mats = reduce(matmul, mats) and discovered that reduce is no longer native for python 3 but needs to be imported from functools. Small change to fractal.py and it works. Anyway, I hope this discovery will help others that are trying to explore pyqtgraph but not getting past the first step. Probably someone with much more experience than me (at least with python) will have to figure out why this works. Suggestions to us Anaconda are not very appealing to me since I'm developing some code that will be used by others and I don't want them to have to install Anaconda. I haven't tried this on in a Windows environment (yet) where my application is currently deployed. I'll have to see if pyqtgraph provides me the right functionality to be able to integrate it with my other pyqt5 code. But on first look, I'm impressed with the functionality of pyqtgraph. Good work! On Wednesday, September 13, 2017 at 5:31:27 PM UTC-4, Armen Levonian wrote: > > So for some reason pyqtgraph started giving the segmentation fault > immediately upon importing the module. > The strange thing was that after I installed it today for Python 3.52 and > after installing all the other deps, it was working perfectly, including > running examples for PyQt5. > > The other strange thing is that it is working perfectly for Python 2.7 > (with PyQt4). > Google search led me to: > *https://stackoverflow.com/questions/44821475/segmentation-fault-core-dumped-in-python-2-7-when-importing-pyqtgraph > > <https://stackoverflow.com/questions/44821475/segmentation-fault-core-dumped-in-python-2-7-when-importing-pyqtgraph>* > > ...and I am having exactly the same problem but only in Python 3.52. I did > the "gdb Python3" step and it reported the same string issue... > > ... > $ gdb python3 > GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1 > Copyright (C) 2016 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later < > http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "x86_64-linux-gnu". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > <http://www.gnu.org/software/gdb/bugs/>. > Find the GDB manual and other documentation resources online at: > <http://www.gnu.org/software/gdb/documentation/>. > For help, type "help". > Type "apropos word" to search for commands related to "word"... > Reading symbols from python3...(no debugging symbols found)...done. > (gdb) run > Starting program: /usr/bin/python3 > [Thread debugging using libthread_db enabled] > Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > Python 3.5.2 (default, Nov 17 2016, 17:05:23) > [GCC 5.4.0 20160609] on linux > Type "help", "copyright", "credits" or "license" for more information. > >>> import pyqtgraph > > *Program received signal SIGSEGV, Segmentation fault.* > *strlen () at ../sysdeps/x86_64/strlen.S:106* > *106 ../sysdeps/x86_64/strlen.S: No such file or directory.* > (gdb) > > ... > > > I think the only thing I did between it working and giving a seg fault is > that Mint update updated google Cloud SDK, but I cannot fathom what > relationship that has except that I noticed it generated an error (did not > note it). > > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyqtgraph+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/7dfc2615-201f-45ce-b576-a540b582a8aa%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.