Biopython - Installation


Advertisements

This section explains how to install Biopython on your machine. It is very easy to install and it will not take more than five minutes.

Step 1 − Verifying Python Installation

Biopython is designed to work with Python 2.5 or higher versions. So, it is mandatory that python be installed first. Run the below command in your command prompt −

> python --version

It is defined below −

Verifying Python Installation

It shows the version of python, if installed properly. Otherwise, download the latest version of the python, install it and then run the command again.

Step 2 − Installing Biopython using pip

It is easy to install Biopython using pip from the command line on all platforms. Type the below command −

> pip install biopython

The following response will be seen on your screen −

Installing Biopython Using pip

For updating an older version of Biopython −

> pip install biopython –-upgrade

The following response will be seen on your screen −

Updating An Older Version

After executing this command, the older versions of Biopython and NumPy (Biopython depends on it) will be removed before installing the recent versions.

Step 3 − Verifying Biopython Installation

Now, you have successfully installed Biopython on your machine. To verify that Biopython is installed properly, type the below command on your python console −

Verifying Biopython Installation

It shows the version of Biopython.

Alternate Way − Installing Biopython using Source

To install Biopython using source code, follow the below instructions −

Download the recent release of Biopython from the following link − https://biopython.org/wiki/Download

As of now, the latest version is biopython-1.72.

Download the file and unpack the compressed archive file, move into the source code folder and type the below command −

> python setup.py build

This will build Biopython from the source code as given below −

Installing Biopython using Source

Now, test the code using the below command −

> python setup.py test

Test The Code

Finally, install using the below command −

> python setup.py install

Finally Install
Advertisements