Skip to content

Instantly share code, notes, and snippets.

@camilosampedro
Last active September 29, 2015 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save camilosampedro/5b695ab5b5ecf8c0b5b0 to your computer and use it in GitHub Desktop.
Save camilosampedro/5b695ab5b5ecf8c0b5b0 to your computer and use it in GitHub Desktop.
Install Jupyter on LMDE2 and Cloudera
#!/bin/bash
# Execute this script as root
# First install python2.7 with an alternative installation
# (Source: http://toomuchdata.com/2014/02/16/how-to-install-python-on-centos/)
yum groupinstall "Development tools"
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
wget http://python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall
# PIP and SetupTools
# First get the setup script for Setuptools:
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
# Then install it for Python 2.7 and/or Python 3.3:
python2.7 ez_setup.py
easy_install-2.7 pip
# Jupyter install
pip2.7 install jupyter
#!/bin/bash
echo "Installing Python and pip"
sudo apt-get install -y python python-pip || { echo "There was an error installing python or pip"; exit; }
echo "Installing matplot prerrequisites"
sudo apt-get install -y build-essential python-dev || { echo "There was an error installing build-essential or python-dev"; exit; }
sudo apt-get install -y libfreetype6-dev || { echo "There was an error installing libfreetype6-dev"; exit; }
echo "Installing matplotlib"
sudo pip install matplotlib || { echo "There was an error installing matplotlib"; exit; }
sudo pip install jupyter || { echo "There was an error installing jupyter"; exit; }
sudo pip uninstall python-dateutil || { echo "There was an error uninstalling python-dateutil"; exit; }
sudo pip install python-dateutil==2.2 || { echo "There was an error reinstalling python-dateutil"; exit; }
sudo pip install sklearn || { echo "There was an error installing sklearn"; exit; }
sudo apt-get install -y python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose || { echo "There was an error installing scikit"; exit; }
@camilosampedro
Copy link
Author

This script has been proved to run on Linux Mint Debian Edition 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment