# Pyzmq in slicer python

**URL:** <https://discourse.slicer.org/t/pyzmq-in-slicer-python/587>\
**Category:** Support\
**Tags:** python\
**Created:** [June 28, 2017, 1:03pm UTC](https://discourse.slicer.org/t/pyzmq-in-slicer-python/587 "2017-06-28T13:03:45Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![ihnorton](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ihnorton/32/9_2.png) [@ihnorton](https://discourse.slicer.org/u/ihnorton)\
**Post date:** [June 28, 2017, 2:48pm UTC](https://discourse.slicer.org/t/pyzmq-in-slicer-python/587/4 "2017-06-28T14:48:50Z")

</div>

The first one has an [example](https://github.com/Danielhiversen/pyIGTLink/blob/07cf0759f6a1901c008c945a6336c355c43f45f6/pyIGTLink/pyIGTLink.py#L483-L501) of sending a numpy array as an image message.

For zmq, recent Slicer nightly versions include pip, and should be able to download a pre-compiled (wheel) version. In the slicer python prompt: `import pip; pip.main(['install', 'PyZMQ'])`

That said, Andras’ suggestion is still better because:

- you need to very careful with the event loop among python, slicer, qt, etc. and this work has already been done for OpenIGTLink
- I’m not sure what the Slicer + wheel (pypi) compatibility level is across platforms. I believe there is/was at least one weird shared library compatibility issue on linux for pyradiomics.

---

_[View the full topic](https://discourse.slicer.org/t/pyzmq-in-slicer-python/587)._
