# Is SlicerJupyter broken on macOS due to argon2-cffi (again?)

**URL:** <https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823>\
**Category:** Support\
**Tags:** jupyter\
**Created:** [February 3, 2021, 9:12pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823 "2021-02-03T21:12:52Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![pll\_llq](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pll_llq/32/9408_2.png) [@pll\_llq](https://discourse.slicer.org/u/pll_llq)\
**Post date:** [February 3, 2021, 9:12pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/1 "2021-02-03T21:12:52Z")

</div>

Hi,

This problem was mentioned here on the forum a couple of times already and some fixes that were made actually worked just a month ago.

Forum posts:

> [@Problems running SlicerJupyter on MacOS](https://discourse.slicer.org/t/problems-running-slicerjupyter-on-macos/15082/6):
>
> Solved! I reinstalled and it launched right into the localhost webpage for Jupyter notebook. I was also able to update pip by calling PythonSlicer instead of python-real. Perhaps this warrants an update of the warning output? Collecting pillow Using cached Pillow-8.0.1-cp36-cp36m-macosx\_10\_10\_x86\_64.whl (2.2 MB) Installing collected packages: pillow Attempting uninstall: pillow Found existing installation: Pillow 8.0.1 Uninstalling Pillow-8.0.1: Successfully uninstalled Pillow-…

> [@Slicer/Jupyter integration: installing python packages](https://discourse.slicer.org/t/slicer-jupyter-integration-installing-python-packages/13386/15):
>
> Pandas has no problem, but ipycanvas, ipywidgets, and ipyevents all give the same error message below, and when I try the command suggested in the warning in terminal, it aborts it [errormessage2]

> [@Open3d pip\_install error on Mac](https://discourse.slicer.org/t/open3d-pip-install-error-on-mac/12867/4):
>
> I installed Open3D on Windows and observed that it had to install a whole bunch of packages where some specify specific dependency versions and others don’t. Installing collected packages: parso, jedi, backcall, wcwidth, prompt-toolkit, decorator, pygments, colorama, pickleshare, ipython-genutils, traitlets, ipython, tornado, pywin32, jupyter-core, python-dateutil, pyzmq, jupyter-client, ipykernel, prometheus-client, pywinpty, terminado, MarkupSafe, jinja2, pycparser, cffi, argon2-cffi, Send2T…

Commit that addressed the issue

> <https://github.com/Slicer/SlicerJupyter/commit/75d59c38eafebc9a380b7f82571ba92d35d2d15c>
>
> This package is needed to run Jupyter server inside Slicer and no wheels are ava…ilable for Python-3.6.7 on Mac.
> If Python version in Slicer is updated then this package may be removed from the extension.

I was using Jupyter Lab inside Slicer in December and January. To my big surprize when I tried to setup a jupyter environment in the freshly downloaded Nightly build the problem came back.  
Jupyter notebook server doesn’t launch from inside slicer and jupyter lab cannot be installed because it can’t build argon2-cffi.  
So the workaround of installing an older version of notebook (6.0.3) works for the notebook server and Jupyter Lab can be installed after that, but now it stopped running. So the workaround doesn’t work any more.

```auto
File "/Applications/MedicalImaging/Slicer.app/Contents/lib/Python/lib/python3.6/sysconfig.py", line 421, in _init_posix
    _temp = __import__ (name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata__darwin_darwin'
Traceback (most recent call last):

```

The funny thing that just about a month ago I was simply running jupyterlab inside slicer with all the nice plugins working “out of the box”.

What would be the advice to solve this? Build, maintain and manually install the macOS wheels for python3.6 or wait a little because support for python 3.7+ is coming during in some foreseeable future?  
Maybe there is some other solution?

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [February 3, 2021, 9:39pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/2 "2021-02-03T21:39:11Z")

</div>

For `argon2-cffi` specifically, there are only wheels available on PyPI for Python 2.7 and Python 3.7 specifically. In the forseeable future we would be updating to probably the latest stable release of Python which is 3.9 at the moment. Therefore I don’t think you’re going to have any long term success installing this package with a wheel from PyPI on macOS. It doesn’t appear that is priority for maintainers of that package to create wheels on Intel mac or Apple silicon mac.

I’m not sure what the factory build machine is doing to manually build `argon2-cffi` and what the macOS compatibility is for the wheel it is making. @lassoan Was it built manually on the factory?

---

<div class="post-metadata">

**Author:** ![pll\_llq](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pll_llq/32/9408_2.png) [@pll\_llq](https://discourse.slicer.org/u/pll_llq)\
**Post date:** [February 3, 2021, 9:50pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/3 "2021-02-03T21:50:45Z")

</div>

Thanks for the input @jamesobutler  
I don’t run into argon2-cffi issues when using jupyter lab for data science tasks in python 3.9 outside slicer. I use pip in that environment and `argon2_cffi-20.1.0-cp37-abi3-macosx_10_6_intel.whl` works fine.

---

<div class="post-metadata">

**Author:** ![pll\_llq](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pll_llq/32/9408_2.png) [@pll\_llq](https://discourse.slicer.org/u/pll_llq)\
**Post date:** [February 3, 2021, 9:57pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/4 "2021-02-03T21:57:34Z")

</div>

A workaround that worked for me just now is to use the Slicer kernel from Jupyter Lab that’s installed outside of Slicer.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 4, 2021, 2:17am UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/5 "2021-02-04T02:17:33Z")

</div>

I’ve added argon2-cffi Python package to the SlicerJupyter extension In December. I’ve just installed latest Slicer Preview Release on a macOS system and Jupyter server from Slicer’s Python environment (started by the JupyterKernel module) worked well.

Last time I updated xeus it had some incompatibility issues with latest jedi. These issues were resolved, so I now [updated xeus and all dependencies to their latest stable version](https://github.com/Slicer/SlicerJupyter/commit/93d12ddfb35d21bdfb873325a2b6f6a787ef6ae9#diff-22624a9f5056e473738160e13b432c9ad12b653e3fcd274885c392f7a7c0cbfb). I’ve tested and it works on Windows. It would be great if you could test SlicerJupyter in the Slicer Preview Release tomorrow on macOS and linux.

---

<div class="post-metadata">

**Author:** ![pll\_llq](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pll_llq/32/9408_2.png) [@pll\_llq](https://discourse.slicer.org/u/pll_llq)\
**Post date:** [February 4, 2021, 8:45pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/6 "2021-02-04T20:45:28Z")

</div>

Hey @lassoan , I’ve just downloaded the .dmg that’s available on Slicer website as the nightly build (version 2020-02-03) and when I install JupyterKernel from the extension manager and press “Launch notebook server” button in the extension UI the error is printed to the python console [full log here](https://gist.github.com/piiq/7bbf45de0fe8748ed950044460ba0e8c).

The workaround that works for me on macOS 11.1:

1. Install JupyterKernel extension
2. Manually install older version of jupyter notebook via python interpreter (`pip_install('notebook=6.0.3')`)
3. Install jupyter lab with all the perks in an environment outside slicer (a brew-python venv for example)
4. Register a new kernel in the external environment using the command from the JupyterKernel Slicer module UI. The kernel should appear on the launcher page and in kernel selection dropdown menus as Slicer-4.13)
5. Use the Slicer 4.13 kernel to connect to the slicer environment from Jupyter Lab

I assume that moving to a more recent version of python will fix this issue and this migration is “around the corner”. I would love to help testing this out.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 5, 2021, 3:12am UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/7 "2021-02-05T03:12:17Z")

</div>

argon2-cffi is included in the [extension package](http://slicer.kitware.com/midas3/api/rest?method=midas.bitstream.download&name=29684-macosx-amd64-SlicerJupyter-git93d12dd-2021-02-03.tar.gz&checksum=bba20c798d12d20b98b5ba723ea9b2af).

The regression is caused by the recent update of Slicer that makes is a portable application.

It seems that the launcher converts relative paths to absolute paths differently depending on how Slicer is started. After installing latest Slicer Preview Release and installing SlicerJupyter extension, result of `import sys; sys.path` is the following:

If you start /⁨Applications⁩/Slicer-20210203.app/⁨Contents/⁨MacOS⁩ from a terminal:

> [‘/Applications/Slicer-20210203.app/Contents/bin/Python/slicer’, ‘/Applications/Slicer-20210203.app/Contents/MacOS/Extensions-29684/SlicerJupyter/lib/Slicer-4.13/qt-scripted-modules’, ‘/Applications/Slicer-20210203.app/Contents/MacOS/Extensions-29684/SlicerJupyter/lib/python3.6/site-packages’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13/qt-scripted-modules’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13/qt-loadable-modules’, ‘/Applications/Slicer-20210203.app/Contents/lib/vtkTeem’, ‘/Applications/Slicer-20210203.app/Contents/bin/Python’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13/qt-loadable-modules/Python’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/lib-dynload’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/site-packages’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python36.zip’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/plat-darwin’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/lib-tk’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/site-packages/SimpleITK-2.0.1-py3.6-macosx-10.13-x86\_64.egg’, ‘/Applications/Slicer-20210203.app/Contents/Extensions-29684/SlicerJupyter/lib/Slicer-4.13/qt-scripted-modules’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13/qt-scripted-modules/SubjectHierarchyPlugins’, ‘/Applications/Slicer-20210203.app/Contents/Extensions-29684/SlicerJupyter/lib/Slicer-4.13/qt-loadable-modules’, ‘/Applications/Slicer-20210203.app/Contents/Extensions-29684/SlicerJupyter/lib/Slicer-4.13/qt-loadable-modules’]

If you double-click on Slicer-20210203 in the Finder:

> [‘/Applications/Slicer-20210203.app/Contents/bin/Python/slicer’, ‘/Extensions-29684/SlicerJupyter/lib/Slicer-4.13/qt-scripted-modules’, ‘/Extensions-29684/SlicerJupyter/lib/python3.6/site-packages’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13/qt-scripted-modules’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13/qt-loadable-modules’, ‘/Applications/Slicer-20210203.app/Contents/lib/vtkTeem’, ‘/Applications/Slicer-20210203.app/Contents/bin/Python’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13/qt-loadable-modules/Python’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/lib-dynload’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/site-packages’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python36.zip’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/plat-darwin’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/lib-tk’, ‘/Applications/Slicer-20210203.app/Contents/lib/Python/lib/python3.6/site-packages/SimpleITK-2.0.1-py3.6-macosx-10.13-x86\_64.egg’, ‘/Applications/Slicer-20210203.app/Contents/Extensions-29684/SlicerJupyter/lib/Slicer-4.13/qt-scripted-modules’, ‘/Applications/Slicer-20210203.app/Contents/lib/Slicer-4.13/qt-scripted-modules/SubjectHierarchyPlugins’, ‘/Applications/Slicer-20210203.app/Contents/Extensions-29684/SlicerJupyter/lib/Slicer-4.13/qt-loadable-modules’, ‘/Applications/Slicer-20210203.app/Contents/Extensions-29684/SlicerJupyter/lib/Slicer-4.13/qt-loadable-modules’]

Note the incorrect path of site-packages:

- started from terminal: `/Applications/Slicer-20210203.app/Contents/MacOS/Extensions-29684/SlicerJupyter/lib/python3.6/site-packages` → there is an extra `MacOS`
- started from Finder: `/Extensions-29684/SlicerJupyter/lib/python3.6/site-packages` → missing `/Applications/Slicer-20210203.app/Contents`

Since the site-packages folder path is incorrect, pip cannot to find the existing argon2 package and that’s why it tries to build it.

@jcfr Could you have a look at this? Do you know what can cause the different behavior? Probably this single line needs to be changed but I don’t know how the launcher works on macOS and what would be the proper path to use:

> <https://github.com/commontk/AppLauncher/blob/9931394cf50c72083ab0b20ea443f1cc591f7752/Base/ctkAppLauncher.cpp#L545>

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [February 11, 2021, 5:43am UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/8 "2021-02-11T05:43:51Z")

</div>

This issue described by @lassoan has been fixed in

> <https://github.com/Slicer/Slicer/commit/bdd75f0f2fc175b1e50ff5db2e1ad5904fa0f98e>

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 11, 2021, 7:16pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/9 "2021-02-11T19:16:52Z")

</div>

Thanks a lot @jcfr!

@pll_llq could you test if Jupyter launches correctly (without the need of setting up an external Python environment) in the Slicer Preview Release that you download tomorrow or later? Thank you.

---

<div class="post-metadata">

**Author:** ![pll\_llq](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pll_llq/32/9408_2.png) [@pll\_llq](https://discourse.slicer.org/u/pll_llq)\
**Post date:** [February 12, 2021, 12:10pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/10 "2021-02-12T12:10:54Z")

</div>

Hi, Just tested this on 4.13.0-2021-02-11.  
There’s no problems with argon2-cffi but the Notebook server didn’t launch.  
The pip part of the install process went OK but the launch failed on a later stage (when jupyter tries to enable the ipyevents extension)

```auto
subprocess.CalledProcessError: Command '['/Applications/MedicalImaging/Slicer.app/Contents/bin/../bin/PythonSlicer', '-m', 'jupyter', 'nbextension', 'enable', '--py', 'ipyevents']' returned non-zero exit status 1.

```

because of

```auto
ImportError: dlopen(/Applications/MedicalImaging/Slicer.app/Contents/lib/Python/lib/python3.6/site-packages/zmq/backend/cython/constants.cpython-36m-darwin.so, 1): Library not loaded: @loader_path/../../.dylibs/libzmq.5.dylib
  Referenced from: /Applications/MedicalImaging/Slicer.app/Contents/lib/Python/lib/python3.6/site-packages/zmq/backend/cython/constants.cpython-36m-darwin.so
  Reason: Incompatible library version: constants.cpython-36m-darwin.so requires version 8.0.0 or later, but libzmq.5.dylib provides version 5.0.0

```

Full log [here](https://gist.github.com/piiq/5087bf13d647ada2b61e18eafd668189)

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [February 14, 2021, 3:39am UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/11 "2021-02-14T03:39:35Z")

</div>

> [@pll\_llq](#):
>
> `Reason: Incompatible library version: constants.cpython-36m-darwin.so requires version 8.0.0 or later, but libzmq.5.dylib provides version 5.0.0`

Look like we need to update zmq library here:

> <https://github.com/Slicer/SlicerJupyter/blob/93d12ddfb35d21bdfb873325a2b6f6a787ef6ae9/SuperBuild/External_ZeroMQ.cmake#L29>

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 14, 2021, 8:58pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/12 "2021-02-14T20:58:06Z")

</div>

I’ve updated to latest version (v4.3.4) and unfortunately nothing has changed. @jcfr do you have any idea what could be the issue?

---

<div class="post-metadata">

**Author:** ![pll\_llq](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pll_llq/32/9408_2.png) [@pll\_llq](https://discourse.slicer.org/u/pll_llq)\
**Post date:** [February 16, 2021, 7:08pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/13 "2021-02-16T19:08:47Z")

</div>

I’ve tried to test SlicerJupyter on linux to validate that the problem is mac-only, but on on the latest nightly the extension was not mentioned in the extension manager. Was it taken down, or is there something I’m missing on linux?

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/a/4abc6bf15562fc40c42dc4503a8d8bc38e6593a0.jpeg)

p.s. this is a laptop with ubuntu 18

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 16, 2021, 7:33pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/14 "2021-02-16T19:33:44Z")

</div>

You can monitor the status of all extension builds on the [dashboard](http://slicer.cdash.org/index.php?project=SlicerPreview).

It seems that gcc bails out on some type check (`xeus/src/xdap_tcp_client.cpp:192:44: error: no matching function for call to ‘zmq::message_t::message_t(std::string&)’`). Probably upgrading xeus or downgrading zmq will fix the issue. I’ll have quick loook.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 17, 2021, 12:46am UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/15 "2021-02-17T00:46:19Z")

</div>

There is a [SlicerJupyter build error](https://slicer.cdash.org/index.php?project=SlicerPreview&filtercount=1&showfilters=1&field1=buildname&compare1=63&value1=Jupyter) on the linux factory:

```nohighlight
[7%] Building CXX object CMakeFiles/xeus-static.dir/src/xdap_tcp_client.cpp.o
/.../SlicerJupyter-build/xeus/src/xdap_tcp_client.cpp: In member function ‘void xeus::xdap_tcp_client::init_tcp_socket(const string&)’:
xeus/src/xdap_tcp_client.cpp:192:44: error: no matching function for call to ‘zmq::message_t::message_t(std::string&)’
             m_socket_id = zmq::message_t(id);
                                            ^
In file included from cppzmq/zmq_addon.hpp:27:0,
                 from xeus/src/xdap_tcp_client.cpp:1:

```

Since I cannot reproduce the error on my linux machine (clean Ubuntu 20.04 install with freshly-built Slicer, with all default options) it is very hard to figure out what exactly is wrong and how to fix it.

@Sam_Horvath Could you have a look at it? The fix may be as simple as adding some constant casting.

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [February 17, 2021, 2:15pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/16 "2021-02-17T14:15:56Z")

</div>

Sure, I can take a look at it

---

<div class="post-metadata">

**Author:** ![Sam\_Horvath](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/sam_horvath/32/3092_2.png) [@Sam\_Horvath](https://discourse.slicer.org/u/Sam_Horvath)\
**Post date:** [February 17, 2021, 2:59pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/17 "2021-02-17T14:59:45Z")

</div>

So:

Changing this line:

> <https://github.com/jupyter-xeus/xeus/blob/3369bc7f1ced8d85c47a9a069677c8719557bc2e/src/xdap_tcp_client.cpp#L192>

to:

`m_socket_id = zmq::message_t(id.data(), id.size());`

fixes the build error. The breaking change was introduced in SlicerJupyter here:

> <https://github.com/Slicer/SlicerJupyter/commit/93d12ddfb35d21bdfb873325a2b6f6a787ef6ae9>

and in Xeus here:

> <https://github.com/jupyter-xeus/xeus/commit/42a1e053d9ca2921ba3b9bba7b7c84075eaf10cf>

Why its breaking: not sure. There is a conversion constructor that should handle this:

> <https://github.com/zeromq/cppzmq/blob/f428fee37426888532b55da152e99de510c8361a/zmq.hpp#L470>

but it doesn’t seem to be.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [February 17, 2021, 3:12pm UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/18 "2021-02-17T15:12:29Z")

</div>

Thanks a lot @Sam_Horvath, this is exactly the information I needed!

---

<div class="post-metadata">

**Author:** ![lmcheukying](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lmcheukying/32/12245_2.png) [@lmcheukying](https://discourse.slicer.org/u/lmcheukying)\
**Post date:** [September 5, 2021, 9:12am UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/19 "2021-09-05T09:12:15Z")

</div>

@Sam_Horvath I’m new to this. Cloud you please elaborate on how to solve the problem for mac users?

I also got the error message “Incompatible library version: constants.cpython-36m-darwin.so requires version 8.0.0 or later, but libzmq.5.dylib provides version 5.0.0” when I install “pip\_install(‘jupyterlab’)  
slicer.util.\_executePythonModule(‘jupyter’,[‘labextension’,‘install’,’@jupyter-widgets/jupyterlab-manager’,‘ipycanvas’,‘ipyevents’])”.

You mentioned that we could change some lines to upgrade and solve this problem, but actually how to do that? like which file?

Thank you!

---

<div class="post-metadata">

**Author:** ![pll\_llq](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pll_llq/32/9408_2.png) [@pll\_llq](https://discourse.slicer.org/u/pll_llq)\
**Post date:** [September 5, 2021, 9:23am UTC](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823/20 "2021-09-05T09:23:40Z")

</div>

Hi, if you like using Jupyter Lab in general (not just for Slicer based research) and you have a Jupyter Lab environment on your local machine that you work with - you can create a Slicer Kernel for that local Jupyter Lab. It will be separate from Slicer but you will be able to use the Slicer environment from there.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/b/4/b4f98290ee48b2af930f586cf311ac86dbe8f1e1.png)

This works for me just fine (apart from Jedi code completion being extremely slow on macOS for some reason).

You can install the Slicer kernel using the command that’s generated by the JupyterKernel extension. See the “Jupyter server in external Python environment” section of the module UI.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/4/2/42f1a5e9a75d9028ab3e3b02a23f03f7c9499a20.png)

[Next page](https://discourse.slicer.org/t/is-slicerjupyter-broken-on-macos-due-to-argon2-cffi-again/15823.md?page=2)
