I'm trying to work out how to use pyqtgraph so that I can use it.
I've tried to run this block of code which I found on the pyqtgraph website
import pyqtgraph.examples
pyqtgraph.examples.run()
But it always throws this error
Traceback (most recent call last):
File "/Users/willemhandreck/Code/Misc.Projects/heater_alert/python/plotly_test.py", line 1, in <module>
import pyqtgraph.examples
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyqtgraph/__init__.py", line 13, in <module>
from .Qt import QtGui
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyqtgraph/Qt.py", line 35, in <module>
from PySide import QtGui, QtCore, QtOpenGL, QtSvg
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PySide/QtGui.so, 2): Library not loaded: libpyside-python2.7.1.2.dylib
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/PySide/QtGui.so
Reason: image not found
How would I fix this?
Yep, same problem here if I try to use the built-in python on the mac.
My solution is to use the anaconda python distribution:
1) Download & install Anaconda python, which already has all the right scientific modules installed. http://continuum.io/downloads#all
2) Restart your terminal and ensure you have anaconda as your python:
3) Then install pyqtgraph:
4) Run the examples from the command line:
or use your import... run method above.
-Caleb