PySurfer
PySurfer copied to clipboard
RuntimeError: No pyface.toolkits plugin could be loaded for qt4 (OSX)
Hello,
After having install PySurfer according guidelines on OSX 10, I wanted to run the simple plot_basics.py example and got this error:
python plot_basics.py
Traceback (most recent call last):
File "plot_basics.py", line 8, in <module>
from surfer import Brain
File "/Users/mattvan83/anaconda/envs/PySurf/lib/python3.6/site-packages/surfer/__init__.py", line 1, in <module>
from .viz import Brain, TimeViewer # noqa
File "/Users/mattvan83/anaconda/envs/PySurf/lib/python3.6/site-packages/surfer/viz.py", line 13, in <module>
from mayavi import mlab
File "/Users/mattvan83/anaconda/envs/PySurf/lib/python3.6/site-packages/mayavi/mlab.py", line 15, in <module>
from mayavi.core.common import process_ui_events
File "/Users/mattvan83/anaconda/envs/PySurf/lib/python3.6/site-packages/mayavi/core/common.py", line 21, in <module>
from pyface import api as pyface
File "/Users/mattvan83/anaconda/envs/PySurf/lib/python3.6/site-packages/pyface/api.py", line 17, in <module>
from .about_dialog import AboutDialog
File "/Users/mattvan83/anaconda/envs/PySurf/lib/python3.6/site-packages/pyface/about_dialog.py", line 19, in <module>
from .toolkit import toolkit_object
File "/Users/mattvan83/anaconda/envs/PySurf/lib/python3.6/site-packages/pyface/toolkit.py", line 27, in <module>
toolkit = toolkit_object = find_toolkit('pyface.toolkits')
File "/Users/mattvan83/anaconda/envs/PySurf/lib/python3.6/site-packages/pyface/base_toolkit.py", line 263, in find_toolkit
return import_toolkit(ETSConfig.toolkit, entry_point)
File "/Users/mattvan83/anaconda/envs/PySurf/lib/python3.6/site-packages/pyface/base_toolkit.py", line 227, in import_toolkit
raise RuntimeError(msg)
RuntimeError: No pyface.toolkits plugin could be loaded for qt4
I used conda environment and tried many different installations of package without any success.
Anybody has a solution?
Best, Matthieu
Can you try also doing:
export QT_API=pyqt
To see if it helps?
Can you do:
$ python -c "from PyQt5 import QtCore"
on your system? If not, then you probably need to pip install pyqt5
or so to get the PyQt5 toolkit going.
I'm not sure the getting started advice we have reflects current best practices with the dependency versions you get from normal channels.
I wrote this a little while back: https://gist.github.com/mwaskom/5464accbdf387b3309520fa9db8837ae
IIRC, conda does now install a mayavi that works better, though