Harvard:Biophysics 101/2007/Notebook:Denizkural/2007-2-2: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
(Ubuntu and Biopython)
No edit summary
Line 1: Line 1:
I would like to share my experiences on installing python and biopython on Ubuntu-Edgy Eft - it was relatively straightforward but not entirely obvious. If you have naively installed the python-biopython package with the correct dependencies like I did and received errors from GenBank, read the following to avoid wasting time:
I would like to share my experiences on installing python and biopython on Ubuntu-Edgy Eft - it was relatively straightforward but not entirely obvious. If you have naively installed the python-biopython package with the correct dependencies like I did and received errors from GenBank, read the following to avoid wasting time:


'''Installing/maintaining packets on Ubuntu'''
==Installing/maintaining packets on Ubuntu==
 
First of all, this is not meant to replace the extensive online documentation Ubuntu has. Before doing anything, go to System->Administration->Software Sources and make sure you select all the sources you will need. You can either use Synaptic Package Manager or use the command-line. Synaptic is fairly self-obvious. You usually need some kind of root access to manage packages. I recommend doing your updates/upgrades regularly - this will make sure you maintain an up-to-date list of available package, and upgrade packages when they get updated:
First of all, this is not meant to replace the extensive online documentation Ubuntu has. Before doing anything, go to System->Administration->Software Sources and make sure you select all the sources you will need.
 
You can either use Synaptic Package Manager or use the command-line. Synaptic is fairly self-obvious. You usually need some kind of root access to manage packages. I recommend doing your updates/upgrades regularly - this will make sure you maintain an up-to-date list of available package, and upgrade packages when they get updated:


   sudo aptitude update
   sudo aptitude update
Line 18: Line 15:
   sudo aptitude install gcc
   sudo aptitude install gcc


'''Installing Biopython'''
==Installing Biopython==
 
Note that the following ara package names and you can just plug those names to the above. Most Ubuntu installations already come with the following but make sure you have them:
Most Ubuntu installations already come with the following but make sure you have them:
 
- python (2.3 or higher)


- gcc (or any other  
* python (2.3 or higher)
* gcc (or any other  


Make sure you install or update the following packages:
Make sure you install or update the following packages:


- python-dev
* python-dev
* python-egenix-mxtexttools
* libc6-dev
* python-numeric
* python-numeric-ext


- python-egenix-mxtexttools
And then install biopython:


- libc6-dev
* python-biopython


- python-numeric
In theory we should be all set, but the problem is that this package is not made from the latest version of biopython we want to install it nonetheless to get the dependencies right. Download the latest stable release from the biopython website, currently residing at http://biopython.org/DIST/biopython-1.42.tar.gz and untar this file into a directory:
 
- python-numeric-ext
 
And then install the following:
 
- python-biopython
 
Now the problem is that this package is not made from the latest version of biopython but we would still like to install it to get the dependencies and everything.  
 
Now download the latest stable release from the biopython website, currently residing at http://biopython.org/DIST/biopython-1.42.tar.gz
 
Untar this file into a directory:


   tar xzvf biopython-1.42.tar.gz
   tar xzvf biopython-1.42.tar.gz
   cd biopython-1.42
   cd biopython-1.42


You can alternatively do this just using the GUI, clicking etc. Now, from that directory, run the following commands:
You can alternatively do this just using the GUI, clicking etc. Now, from that directory, run the following commands:
Line 56: Line 44:
   sudo python setup.py install
   sudo python setup.py install


Note that on the README it asks you to run test as well. I did and it seems to not progress after the 3rd test, and for now I haven't seen any harm in skipping the tests. I will report on this more later.


Now you're all set, save any script to a file (usually with a .py extention but this is not strictly necessary) and run it using the following:
Note that on the README it asks you to run test as well. I did and it seems to not progress after the 3rd test, and for now I haven't seen any harm in skipping the tests. I will report on this more later. You're all set, save any script to a file (usually with a .py extention but this is not strictly necessary) and run it using the following:


   python example.py
   python example.py

Revision as of 03:01, 14 February 2007

I would like to share my experiences on installing python and biopython on Ubuntu-Edgy Eft - it was relatively straightforward but not entirely obvious. If you have naively installed the python-biopython package with the correct dependencies like I did and received errors from GenBank, read the following to avoid wasting time:

Installing/maintaining packets on Ubuntu

First of all, this is not meant to replace the extensive online documentation Ubuntu has. Before doing anything, go to System->Administration->Software Sources and make sure you select all the sources you will need. You can either use Synaptic Package Manager or use the command-line. Synaptic is fairly self-obvious. You usually need some kind of root access to manage packages. I recommend doing your updates/upgrades regularly - this will make sure you maintain an up-to-date list of available package, and upgrade packages when they get updated:

  sudo aptitude update
  sudo aptitude upgrade

To install/upgrade a package:

  sudo aptitude install [package]
  sudo aptitude upgrade [package]
  
  to give an example:
  sudo aptitude install gcc

Installing Biopython

Note that the following ara package names and you can just plug those names to the above. Most Ubuntu installations already come with the following but make sure you have them:

  • python (2.3 or higher)
  • gcc (or any other

Make sure you install or update the following packages:

  • python-dev
  • python-egenix-mxtexttools
  • libc6-dev
  • python-numeric
  • python-numeric-ext

And then install biopython:

  • python-biopython

In theory we should be all set, but the problem is that this package is not made from the latest version of biopython we want to install it nonetheless to get the dependencies right. Download the latest stable release from the biopython website, currently residing at http://biopython.org/DIST/biopython-1.42.tar.gz and untar this file into a directory:

  tar xzvf biopython-1.42.tar.gz
  cd biopython-1.42


You can alternatively do this just using the GUI, clicking etc. Now, from that directory, run the following commands:

  sudo python setup.py build
  sudo python setup.py install


Note that on the README it asks you to run test as well. I did and it seems to not progress after the 3rd test, and for now I haven't seen any harm in skipping the tests. I will report on this more later. You're all set, save any script to a file (usually with a .py extention but this is not strictly necessary) and run it using the following:

  python example.py