!pip install ipyparallel
Collecting ipyparallel
  Downloading https://files.pythonhosted.org/packages/69/24/e31b11450cf2c03228ff51e5febc4c18d2e8a3a81d03d547fc6bf482de8f/ipyparallel-6.1.1-py2.py3-none-any.whl (193kB)
    100% |████████████████████████████████| 194kB 1.4MB/s eta 0:00:01
Requirement already satisfied: pyzmq>=13 in /srv/paws/lib/python3.6/site-packages (from ipyparallel)
Requirement already satisfied: traitlets>=4.3 in /srv/paws/lib/python3.6/site-packages (from ipyparallel)
Requirement already satisfied: ipykernel in /srv/paws/lib/python3.6/site-packages (from ipyparallel)
Requirement already satisfied: decorator in /srv/paws/lib/python3.6/site-packages (from ipyparallel)
Requirement already satisfied: jupyter-client in /srv/paws/lib/python3.6/site-packages (from ipyparallel)
Requirement already satisfied: ipython>=4 in /srv/paws/lib/python3.6/site-packages (from ipyparallel)
Requirement already satisfied: ipython-genutils in /srv/paws/lib/python3.6/site-packages (from ipyparallel)
Requirement already satisfied: tornado>=4 in /srv/paws/lib/python3.6/site-packages (from ipyparallel)
Requirement already satisfied: python-dateutil>=2.1 in /srv/paws/lib/python3.6/site-packages (from ipyparallel)
Requirement already satisfied: six in /srv/paws/lib/python3.6/site-packages (from traitlets>=4.3->ipyparallel)
Requirement already satisfied: jupyter-core in /srv/paws/lib/python3.6/site-packages (from jupyter-client->ipyparallel)
Requirement already satisfied: pickleshare in /srv/paws/lib/python3.6/site-packages (from ipython>=4->ipyparallel)
Requirement already satisfied: pygments in /srv/paws/lib/python3.6/site-packages (from ipython>=4->ipyparallel)
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.4 in /srv/paws/lib/python3.6/site-packages (from ipython>=4->ipyparallel)
Requirement already satisfied: simplegeneric>0.8 in /srv/paws/lib/python3.6/site-packages (from ipython>=4->ipyparallel)
Requirement already satisfied: pexpect; sys_platform != "win32" in /srv/paws/lib/python3.6/site-packages (from ipython>=4->ipyparallel)
Requirement already satisfied: jedi>=0.10 in /srv/paws/lib/python3.6/site-packages (from ipython>=4->ipyparallel)
Requirement already satisfied: setuptools>=18.5 in /srv/paws/lib/python3.6/site-packages (from ipython>=4->ipyparallel)
Requirement already satisfied: wcwidth in /srv/paws/lib/python3.6/site-packages (from prompt-toolkit<2.0.0,>=1.0.4->ipython>=4->ipyparallel)
Requirement already satisfied: ptyprocess>=0.5 in /srv/paws/lib/python3.6/site-packages (from pexpect; sys_platform != "win32"->ipython>=4->ipyparallel)
Requirement already satisfied: parso==0.1.1 in /srv/paws/lib/python3.6/site-packages (from jedi>=0.10->ipython>=4->ipyparallel)
Installing collected packages: ipyparallel
Successfully installed ipyparallel-6.1.1
!ipcluster nbextension enable
Enabling IPython clusters tab
Traceback (most recent call last):
  File "/srv/paws/bin/ipcluster", line 11, in <module>
    sys.exit(launch_new_instance())
  File "/srv/paws/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
    app.start()
  File "/srv/paws/lib/python3.6/site-packages/ipyparallel/apps/ipclusterapp.py", line 668, in start
    return self.subapp.start()
  File "/srv/paws/lib/python3.6/site-packages/ipyparallel/apps/ipclusterapp.py", line 631, in start
    install_extensions(enable=True, user=self.user)
  File "/srv/paws/lib/python3.6/site-packages/ipyparallel/nbextension/install.py", line 24, in install_extensions
    toggle_serverextension_python('ipyparallel.nbextension', user=user)
  File "/srv/paws/lib/python3.6/site-packages/notebook/serverextensions.py", line 74, in toggle_serverextension_python
    cm.update("jupyter_notebook_config", cfg)
  File "/srv/paws/lib/python3.6/site-packages/notebook/config_manager.py", line 108, in update
    self.set(section_name, data)
  File "/srv/paws/lib/python3.6/site-packages/notebook/config_manager.py", line 92, in set
    self.ensure_config_dir_exists()
  File "/srv/paws/lib/python3.6/site-packages/notebook/config_manager.py", line 52, in ensure_config_dir_exists
    os.makedirs(self.config_dir, 0o755)
  File "/usr/lib/python3.6/os.py", line 220, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/usr/local/etc/jupyter'

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@python.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    c.Application.verbose_crash=True

 
!ipcluster start
2018-05-10 22:22:53.085 [IPClusterStart] Starting ipcluster with [daemon=False]
2018-05-10 22:22:53.088 [IPClusterStart] Creating pid file: /home/paws/.ipython/profile_default/pid/ipcluster.pid
2018-05-10 22:22:53.089 [IPClusterStart] Starting Controller with LocalControllerLauncher
2018-05-10 22:22:54.096 [IPClusterStart] Starting 4 Engines with LocalEngineSetLauncher
2018-05-10 22:23:24.428 [IPClusterStart] Engines appear to have started successfully
^C
2018-05-10 22:25:22.266 [IPClusterStart] ERROR | IPython cluster: stopping
2018-05-10 22:25:22.267 [IPClusterStart] Stopping Engines...
import os
import ipyparallel as ipp

rc = ipp.Client()
ar = rc[:].apply_async(os.getpid)
pid_map = ar.get_dict()
Waiting for connection file: ~/.ipython/profile_default/security/ipcontroller-client.json
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
<ipython-input-7-2c21c389974b> in <module>()
      2 import ipyparallel as ipp
      3 
----> 4 rc = ipp.Client()
      5 ar = rc[:].apply_async(os.getpid)
      6 pid_map = ar.get_dict()

/srv/paws/lib/python3.6/site-packages/ipyparallel/client/client.py in __init__(self, url_file, profile, profile_dir, ipython_dir, context, debug, sshserver, sshkey, password, paramiko, timeout, cluster_id, **extra_args)
    410                         no_file_msg,
    411                     ])
--> 412                     raise IOError(msg)
    413         if url_file is None:
    414             raise IOError(no_file_msg)

OSError: Connection file '~/.ipython/profile_default/security/ipcontroller-client.json' not found.
You have attempted to connect to an IPython Cluster but no Controller could be found.
Please double-check your configuration and ensure that a cluster is running.