Installing Jupyter Notebooks on Solaris

pip installing jupyterlab may give you the following error (somewhere in the error output anyway!):

      4 | #include "zmq.h"
        |          ^~~~~~~
  compilation terminated.

  error: command 'gcc' failed with exit status 1

  Failed with default libzmq, trying again with /usr/local
  {'libraries': ['zmq'], 'include_dirs': ['/usr/local/include'], 'library_dirs': ['/usr/local/lib/amd64', '/usr/local/lib'], 'runtime_library_dirs': ['/usr/local/lib/amd64', '/usr/local/lib'], 'extra_link_args': ['-m64']}

The simplest solution I’ve found to this is just to install libzmq. We can pull the latest code from github and install it. I usually install things in /opt but as the pip process will look for libzmq in /usr/local, we’ll install it in there this time.

pkg install git libtool 
git clone /export/libzmq
cd /export/libzmq
./configure --prefix=/usr/local MAKE=gmake
gmake install
pip install jupyterlab

If you do put it somewhere other than /usr/local you might need to let pkg-config know. E.g.:

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/libzmq/lib/pkgconfig/

Tested on a SPARC-M7 T7-1 kernel zone running

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top