open-ephys / open-ephys-python-tools

Python code for interacting with the Open Ephys GUI
MIT License
29 stars 17 forks source link

ImportError: zmq Cython backend has not been compiled #31

Closed stef1029 closed 3 months ago

stef1029 commented 3 months ago

Hi, When trying to run the line import open_ephys.control as control I get the following error:

Traceback (most recent call last):
  File "c:\Users\Tripodi Group\Behaviour_code\Sendkey-multi\Scripts\OEAB_record.py", line 1, in <module>
    import open_ephys.control as control
  File "C:\Users\Public\.conda\July_cohort\lib\site-packages\open_ephys\control\__init__.py", line 1, in <module>
    from .network_control import NetworkControl
  File "C:\Users\Public\.conda\July_cohort\lib\site-packages\open_ephys\control\network_control.py", line 25, in <module>
    import zmq
  File "C:\Users\Public\.conda\July_cohort\lib\site-packages\zmq\__init__.py", line 80, in <module>
nit__.py", line 25, in <module>
    _ns = select_backend(first)
  File "C:\Users\Public\.conda\July_cohort\lib\site-packages\zmq\backend\select.py", line 31, in select_backend

    mod = import_module(name)
  File "C:\Users\Public\.conda\July_cohort\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\Public\.conda\July_cohort\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
    from . import _zmq
  File "C:\Users\Public\.conda\July_cohort\lib\site-packages\zmq\backend\cython\_zmq.py", line 14, in <module> 
    raise ImportError("zmq Cython backend has not been compiled") from None
ImportError: zmq Cython backend has not been compiled

As far as I can tell this is specific to the setup I have on my computer I'm trying to get it running on, since I have another where it works fine, but it seems to be the same as far as I can tell, so I'm not sure what's going on. It's currently trying to run with python 3.10.14, and I'm using v0.1.8 of the tools. The computer it works on is windows 10, and the one it doesn't work on is windows 11, just thought I'd add that in case that's a known reason it wouldn't work. Thanks for any help you can give, Stefan

stef1029 commented 3 months ago

Fixed by downgrading pyzmq to v25.1.2