How can I install ipython notebook on ubuntu 17?

Viewed 9609

I tried to install ipython notebook on my OS.But there was an error.How can I solve this?

sudo apt-get install ipython-notebook

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ipython-notebook is not available, but is referred to by another packag. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'ipython-notebook' has no installation candidate

4 Answers

I installed ipython via apt, and then went the pip and virtualenvwrapper route for ipython-notebook, which worked for me. The commands were:

sudo apt -y install ipython mkvirtualenv ipynb pip install ipython[notebook]

Alternatively:

sudo apt -y install ipython mkvirtualenv ipynb pip install ipython[all]

FWIW, I ran into this error when trying to run the following command on a freshly spun up Ubuntu 18 image (on AWS, ami-0ac019f4fcb7cb7e6):

sudo apt-get install ipython3

E: Package 'ipython3' has no installation candidate

Running an apt-get update solved the problem. So:

sudo apt-get update
sudo apt-get install ipython3

Interestingly, I was surprised to find that this particular distro doesn't come with Python 2.7 installed, only Python3. That's probably AWS just trying to keep things light, which I appreciate.

Hopefully this helps someone down the line.

Related