Installation

Minimal requirements

phydms is written in Python. It requires Python 3.5 or higher.

Straightforward installation requires the Python package management system pip and a C compiler such a gcc (there are some cython extensions).

phydms has been tested on relatively recent versions of Linux and Mac OS X.

Quick installation

If you have the Minimal requirements, you can install phydms by simply typing:

pip install phydms --user

This assumes that the local installation directory is in your current path. See below for more details.

Where to install phydms with pip

You need to figure out where you want to install phydms. Using sudo to install globally is not recommended for Python packages in general.

We suggest that you use one of the following two options:

Install via the --user option to pip

The Python convention for local installation is to install locally using the --user option to pip. This option installs into ~/.local/ for Linux, or into $HOME/.local/lib/Python/x.y/ (where x.y is the Python version, such as 3.5) for Mac OS X.

For locally installed programs to be accessible, you need to add ~/.local/bin/ to the PATH variable, and ~/.local/lib/ to the PYTHONPATH variable. If you are using the bash shell, you would do this by adding the following lines to your ~/.bashrc file:

PATH=$HOME/.local/bin/:$PATH
export PYTHONPATH=$HOME/.local/lib/python3.5/:$PATH

You then want to make sure that your ~/.bash_profile simply sources your ~/.bashrc file as described here by making ~/.bash_profile consist of the following:

if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

Once the paths are set up as described above, simply install with:

pip install --user

If this fails, check if you have pip installed. You can do this by typing:

pip -h

If you instead get an error message such as -bash: pip: command not found then you need to install pip. If you have easy_install, then you can install pip globally with:

sudo easy_install pip

or locally with:

easy_install pip --user

If those commands also fail (i.e. you don’t have easy_install either), then install pip by following the instructions here.

Install into a virtual environment

The other good approach is to use pip to install into a virtual environment. The use of virtual environments is described here. Once you have created a virtual environment as in these instructions, you can just install with pip dropping the --user command.

Upgrading your phydms version with pip

If you have previously installed phydms but are not sure that you have the latest version, you can upgrade using pip:

pip install phydms --upgrade --user

Install phydms from source code

First clone the phydms source code from GitHub:

git clone https://github.com/jbloomlab/phydms

Then install locally with:

cd phydms
pip install -e . --user

Other required software

phydms requires some external Python packages. The up-to-date exact requirements are listed under install_requires in the setup.py file in the main directory of the phydms source code. If you are installing with pip, these external packages will automatically be installed. If you are installing from source, you may need to install these packages yourself.

Older versions (e.g., version 1.0)

The original version of phydms (version 1.*) used in Bloom, Biology Direct, 12:1 had similar functionality, but an entirely different implementation that utilized Bio++ for the likelihood calculations. The new version (version 2.*) has similar functionality, but is a completely new implementation and so may give slightly different results.

The last stable version of the old implementation is 1.3.0. The source code for that version is available here. The older implementations are also still on PyPI.