Contents
`phydms`_ is written in `Python`_. It requires Python 3.4 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.
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:
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.
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.
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
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
`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.
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`_.