1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
.. _installation::
Installation
============
We recommend that you install ``mdtraj`` with ``conda``. ::
$ conda install -c conda-forge mdtraj
You can install also ``mdtraj`` with ``pip``, if you prefer. ::
$ pip install mdtraj
Conda is a cross-platform package manager built especially for scientific
python. It will install ``mdtraj`` along with all dependencies from a
pre-compiled binary. If you don't have Python or the ``conda`` package
manager, we recommend starting with the `Anaconda Scientific Python
distribution <https://store.continuum.io/cshop/anaconda/>`_, which comes
pre-packaged with many of the core scientific python packages that MDTraj
uses (see below), or with the `Miniconda Python distribution
<http://conda.pydata.org/miniconda.html>`_, which is a bare-bones Python
installation.
MDTraj supports Python 2.7 or Python 3.4+ (recommended) on Mac, Linux, and
Windows.
Compiling From Source
---------------------
To compile MDTraj from source, you should use pip as well::
git clone https://github.com/mdtraj/mdtraj
cd mdtraj
pip install -e .
Testing Your Installation
-------------------------
Running the tests is a great way to verify that everything is working. The test
suite uses `pytest <https://pytest.readthedocs.org/en/latest/>`_, which you can pick
up via ``pip`` if you don't already have it. ::
pip install pytest
Then, to run the tests, execute the commands ::
git clone https://github.com/mdtraj/mdtraj.git
cd mdtraj
# If using conda, make sure to have your conda environment active
py.test
|