Skip to content

Instantly share code, notes, and snippets.

@sangheestyle
Last active August 29, 2015 14:07
Show Gist options
  • Save sangheestyle/256be0c48c7493f05494 to your computer and use it in GitHub Desktop.
Save sangheestyle/256be0c48c7493f05494 to your computer and use it in GitHub Desktop.
How to install Debian and some Python data science tools.
OK, here is what you should do to use python pandas on Debian Wheezy,
Step 1: Make a bootable image with usb key
a. Get a usb key
b. Download debian live ISO image (recommend xfce integrated image)
c. Make a usb key as a ISO boot image (recommend using dd)
Step 2: Install & Boot
d. Boot up your machine with Debian usb key (recommend UEFI)
e. Do configuration
f. Do partitioning (you might want to make at least 2 partitions, UEFI and root. Also consider swap, home, and you name it)
g. Reboot your system.
In this step, sometimes your debian machine does not boot up and just hang. Check the following article.
http://forums.debian.net/viewtopic.php?p=435313
Step 3: Extra works for OS
h. Recommend kernel update if you want (but if you don't have time, just skip): https://docs.docker.com/installation/debian/
i. Recommend install firefox: http://superuser.com/questions/322376/how-to-install-the-real-firefox-on-debian
j. Install some tools you want such as curl, vim, and gvim(recommend apt-get install vim-gtk if you use xfce)
Step 4: Install what your programming requires
k. Recommend installing pyenv and pyenv-virtualenv: https://github.com/yyuu/pyenv , https://github.com/yyuu/pyenv-virtualenv
l. Install specific python versions which you want (If you use pyenv, you can do $ pyenv install 2.7.6; pyenv global 2.7.6 ... read documentations)
WARNING: $ ipython --pylab with TKAgg backend on python 2.7.8 and 2.7.7 raises backend errors on Debian Wheezy and OS X v10.9.5. Use python 2.7.6 instead of 2.7.8. I have tested both cases.
Step 5: Install some python data-centric packages
m: install packages with apt-get for building numpy and scipy(pip requires gfortran for compiling some code of numpy and LAPACK for accelerating calculation)
$ sudo apt-get install liblapack-dev gfortran
n: install packages with pip for basic data science packages
$ pip install numpy scipy pandas ipython
o: Install packages for plotting
$ sudo apt-get install build-dep python-matplotlib
$ pip install tornado pyparsing matplotlib
p: Finally, run ipython with pylab (It means you can use ipython and plot)
$ ipython --pylab
If you have problems on plotting at ipython, check your backend. http://matplotlib.org/faq/usage_faq.html#what-is-a-backend
Notice: You can also read this at https://medium.com/@sanghee/installing-debian-wheezy-for-using-python-data-tools-37652bc5056f
@sangheestyle
Copy link
Author

Btw, you might want to install Pulse Audio Volume Contol.

$ sudo apt-get install pavucontrol

If it is not working correctly, just try it once again.

$ sudo apt-get --purge --reinstall install pulseaudio

Also, check the following.
http://askubuntu.com/questions/70560/why-am-i-getting-this-connection-to-pulseaudio-failed-error

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