Installation
You can get started right away, without installing stdpopsim
locally, by using the
Jupyter Binder.
There are two basic options for installing stdpopsim
and its dependencies: either
using Conda or Pip.
We recommend conda for most users (particularly those using OSX or Windows),
although pip can be more convenient in certain cases.
Requirements
Library requirements for stdpopsim
should be installed automatically when using
either conda or pip.
stdpopsim
requires Python 3.5 or later.
Conda
Pre-built binary packages for stdpopsim
are available through
conda, and built using conda-forge.
Packages for recent version of Python are available for Linux, OSX and Windows. Install
using:
$ conda install -c conda-forge stdpopsim
Quick Start
Install
conda
using miniconda. Make sure you follow the instructions to fully activate yourconda
installation!Set up the conda-forge channel using
conda config --add channels conda-forge
.Install stdpopsim:
conda install stdpopsim
.Try it out:
stdpopsim --version
.
There are several different ways to obtain conda
. Please see the
anaconda installation documentation
for full details.
Pip
Installing using pip is usually as simple as:
$ python -m pip install stdpopsim --user
This will install stdpopsim
into your local user Python packages
(on some systems you will need to use python3
rather than
python
). Please see the Python package installation
tutorial for more details on the various installation options. In particular,
we recommend using a virtual environment
to improve reproducibility.
It may also be necessary to update your PATH to run the command line interface. See here for details on what this means and how to do it.
We use msprime as the default simulation engine, which has some system level dependencies and requires a functioning compiler. Please see the msprime installation documentation for instructions if you encounter errors during installation.
Running the CLI
After installation is complete it should be possible to run the command line interface. This can be done in one of two ways:
The most reliable way is to use
$ python -m stdpopsim
Once the
python
executable is the same one as was used when installingconda
orpip
, this is guaranteed to work.It is also possible to run
stdpopsim
like a regular Unix program using:$ stdpopsim
However, this requires that your PATH environment variable contains the directory where conda or pip installed the executable. Please see the specific documentation on these methods above for details on how to do this.