Ubuntu – Cannot run jupyter notebook in Ubuntu

command linejupyterpython

I have installed jupyter notebook using:

sudo pip3 install jupyter

It seemed to work but I got the error:

The directory '/home/user1/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/user1/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag

When I run it:

jupyter notebook

I get the error:

Error executing Jupyter command 'notebook': [Errno 8] Exec format error

Best Answer

I faced similar issue. This is what I did to fix the issue (on Ubuntu 16.04):

sudo apt-get remove ipython
sudo apt-get purge ipython 
sudo apt-get autoremove
pip install jupyter

ipython seemed to be the problem, hence removing it fixed the issue.

I'm now able to run jupyter notebook

Related Question