If I try to check if jupyter
is in my path or not using, I get something in return.
which jupyter
/home/usr/.local/bin/jupyter
But when I try to install and enable an extension, I face error:
sudo jupyter serverextension enable --py ipyparallel
sudo jupyter nbextension install --py ipyparallel
sudo jupyter nbextension enable --py ipyparallel
The error says sudo: jupyter: command not found
And I need sudo access. Cause executing without sudo, doesn't get the job done:
jupyter serverextension enable --py ipyparallel
jupyter nbextension install --py ipyparallel
jupyter nbextension enable --py ipyparallel
Enabling: ipyparallel.nbextension
- Writing config: /home/usr/.jupyter
- Validating...
ipyparallel.nbextension OK
Installing /home/usr/.local/lib/python2.7/site-packages/ipyparallel/nbextension/static -> ipyparallel
Traceback (most recent call last):
File "/home/usr/.local/bin/jupyter-nbextension", line 8, in <module>
sys.exit(main())
File "/home/usr/.local/lib/python2.7/site-packages/jupyter_core/application.py", line 270, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/usr/.local/lib/python2.7/site-packages/traitlets/config/application.py", line 664, in launch_instance
app.start()
File "/home/usr/.local/lib/python2.7/site-packages/notebook/nbextensions.py", line 988, in start
super(NBExtensionApp, self).start()
File "/home/usr/.local/lib/python2.7/site-packages/jupyter_core/application.py", line 259, in start
self.subapp.start()
File "/home/usr/.local/lib/python2.7/site-packages/notebook/nbextensions.py", line 716, in start
self.install_extensions()
File "/home/usr/.local/lib/python2.7/site-packages/notebook/nbextensions.py", line 695, in install_extensions
**kwargs
File "/home/usr/.local/lib/python2.7/site-packages/notebook/nbextensions.py", line 225, in install_nbextension_python
destination=dest, logger=logger
File "/home/usr/.local/lib/python2.7/site-packages/notebook/nbextensions.py", line 126, in install_nbextension
ensure_dir_exists(nbext)
File "/home/usr/.local/lib/python2.7/site-packages/jupyter_core/utils/__init__.py", line 13, in ensure_dir_exists
os.makedirs(path, mode=mode)
File "/usr/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/share/jupyter'
Enabling tree extension ipyparallel/main...
- Validating: OK
In this(^) case, the error says : OSError: [Errno 13] Permission denied: '/usr/local/share/jupyter'
So how can I fix this?
I've added export PATH="$HOME/.local/bin:$PATH"
at the last line of ~/.bashrc