Hello there,

I am new to pyqtgraph and cannot run basic examples like the following one 
(found in their documentation):

import pyqtgraph as pg
import numpy as np

x = np.linspace(0.0, 2 * np.pi, 1000)
y = np.sin(x)
pw = pg.plot(x, y, pen="r") # plot x vs y in red

I get the following error:
Traceback (most recent call last):
  File 
"/Users/tudoroancea/Developer/racing-team/data_visualization/work/pyqtgraph.py",
 
line 2, in <module>
    import pyqtgraph as pg
  File 
"/Users/tudoroancea/Developer/racing-team/data_visualization/work/pyqtgraph.py",
 
line 9, in <module>
    pw = pg.plot(x, y, pen="r")  # plot x vs y in red
AttributeError: partially initialized module 'pyqtgraph' has no attribute 
'plot' (most likely due to a circular import)

However, when I run the examples provided with pyqtgraph during 
installation it works just fine.
I am using pyqtgraph v0.12.4, and tried with both qt5 and qt6, and with 
both PySide and PyQt.
Do you have any idea where the problem might come from?

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/b069eda1-bd1a-4836-95b5-5715f341e1f3n%40googlegroups.com.

Reply via email to