stytra
stytra copied to clipboard
Installation issues, PyQt is the prime suspect
Thank you for the impressive work!
I am on a MacBook M2. I followed religiously the installation instructions:
conda env create -f ~/.../environment.yml # edited to create environment 'stytra', not 'stytra_env'
conda activate stytra
pip install stytra
But running python -m stytra.examples.looming_exp
crashes:
ImportError: dlopen(/Users/francoiskroll/miniconda3/envs/stytra/lib/python3.12/site-packages/PyQt5/QtCore.abi3.so, 0x0002): Library not loaded: @rpath/QtCore.framework/Versions/5/QtCore etc.
I did notice pip install stytra
does suspicious things around PyQt, like:
Attempting uninstall: PyQt5-sip Found existing installation: PyQt5-sip 12.12.2 Uninstalling PyQt5-sip-12.12.2: Successfully uninstalled PyQt5-sip-12.12.2
But well, it concludes
Successfully installed [...] PyQt5-5.15.10 PyQt5-Qt5-5.15.12 PyQt5-sip-12.13.0 [...]
And all seems present if I run conda list
:
[...] pyqt 5.15.9 py312h550cae4_5 conda-forge pyqt5 5.15.10 pypi_0 pypi pyqt5-qt5 5.15.12 pypi_0 pypi pyqt5-sip 12.13.0 pypi_0 pypi pyqtgraph 0.13.4 pypi_0 pypi [...]
I tried a bunch of other things including the "Editable installation". No success, sadly.
I also tried starting from scatch, removing - pyqt
from environment.yml, and letting pip install stytra
do it (as it's so keen on installing PyQt even if it's already there!). In that case, python -m stytra.examples.looming_exp
gives a different error, maybe useful for you to diagnose?
File "/Users/francoiskroll/miniconda3/envs/stytra/lib/python3.12/site-packages/stytra/gui/fishplots.py", line 16, in
class StreamingPositionPlot(pg.GraphicsWindow): ^^^^^^^^^^^^^^^^^ AttributeError: module 'pyqtgraph' has no attribute 'GraphicsWindow'. Did you mean: 'GraphicsView'?
So it's still PyQt being a pain, but at least stytra found it, I guess.
What am I missing?