Install Jupyter Notebook on Jetson TX2

This is my memo to setup Jupyter Notebook on Jetson TX2.

Environment

  • Ubuntu 16.04
  • Jetson TX2
  • JetPack 3.2.1
  • Jupyter 4.4.0

Notes

Always use Anaconda to setup python on Ubuntu. But, could not use it on Jetson TX2 unfortunately.
Anaconda or Miniconda on Jetson tx2? – NVIDIA Developer Forums

Install Pyenv

Before installed Jupyter, setup pyenv. Because thinking about will install ROS in the near future.

$ sudo apt-get install python3-dev
$ pip3 install virtualenv
$ virtualenv -p python3 venv_jupyter
$ source venv_jupyter/bin/activate

Install Jupyter Notebook

Install jupyter using pip.

$ pip3 install jupyter

At that time, got an error with pyzmq.

    bundled/zeromq/src/atomic_ptr.hpp:116:14: note:   initializing argument 4 of ‘void* zmq::atomic_cas(void* volatile*, void*, void*, zmq::mutex_t&)’
     inline void *atomic_cas (void *volatile *ptr_,
                  ^
    error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/home/nvidia/jupyter/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-r9j4dl00/pyzmq/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-s7ark6hz/install-record.txt --single-version-externally-managed --compile --install-headers /home/nvidia/jupyter/include/site/python3.5/pyzmq" failed with error code 1 in /tmp/pip-install-r9j4dl00/pyzmq/

Installed pyzmq 17.0.0 individually.

$ pip3 install pyzmq==17.0.0

And tried again.

$ pip3 install jupyter
$ jupyter notebook

Finish!