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?