How To Install iPython Jupyter Notebook On Ubuntu 16.04 Using Vagrant
January 4, 2018
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-jupyter-notebook-to-run-ipython-on-ubuntu-16-04First, in Vagrantfile make sure the forwarded ports reflect the code below (Jupyter notebook uses port 8888):
config.vm.network "forwarded_port", guest: 8888, host: 8888
or (you can access iPython Jupyter at 127.0.0.1 instead of 127.0.0.1:888):config.vm.network "forwarded_port", guest: 8888, host: 80
1. Install Python 2.7 and Pip
First login to vm with ssh:$ vagrant sshThen,$ sudo apt-get update
$ sudo apt-get -y install python2.7 python-pip python-devTo verify that you have python installed:$ python --versionYou can also check if pip is installed using the following command:$ pip --version2. Install Ipython and Jupyter Notebook
$ sudo apt-get -y install ipython ipython-notebook
$ sudo -H pip install jupyterERRORS & SOLUTIONS: Depending on what version of pip is in the Ubuntu apt-get repository, you might get the following error when trying to install Jupyter:You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.Use pip to upgrade pip to the latest version:$ sudo -H pip install --upgrade pipAfter pgrading pip, try installing Jupyter again:$ sudo -H pip install jupyter3. Running Jupyter Notebook
You can start jupyter notebook with an extra config line of ‘–ip=0.0.0.0’. This tells jupyter to listen on any IP address. This is the only way I can run jupyter notebook while using vagrant. http://pythondata.com/vagrant-on-windows/ and http://pythondata.com/jupyter-vagrant/$ jupyter notebook --ip=0.0.0.0Access Jupyter by going to:
http://127.0.0.1:8888 or (http://127.0.0.1 if you chose the second option above)
and copy/paste the token you see in the command line into the password field. You will have to copy/paste the login token (after …?token=) in the command line output into the login field of jupyter.Next, we can also configure the Python environment
Installing Python LibrariesHow To Install Virtualenv & Django Framework
Posted in Tutorials