sending an email through gmail using python

[Jupyter Notebook] ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: ‘/usr/local/bin/jupyter’

This issue was encountered while installing Python Jupyter Notebook. I have an instance of the Jupyter Notebook server installed n my Linux machine. But while I tried it to upgrade it to the latest version I got the Environment Error.

Initially I tried the following command using pip to upgrade the notebook from terminal:

$pip install notebook --upgrade -home

Than the EnvironmentError was raised. To overcome this error all we need to do is set our home as the base environment for upgrading the package and try upgrading.

The command is shown below:

sudo -H pip install notebook --upgrade

This sets our current home director as the base for installation and performs the upgrade. I successfully upgraded my Jupyter Notebook by above command.