install.rst 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. .. _install:
  2. ************
  3. Installation
  4. ************
  5. The easiest way to install Elephant is by creating a conda environment, followed by ``pip install elephant``.
  6. Below is the explanation of how to proceed with these two steps.
  7. .. _prerequisites:
  8. Prerequisites
  9. =============
  10. Elephant requires Python_ 2.7, 3.5, 3.6, 3.7, or 3.8.
  11. .. tabs::
  12. .. tab:: (recommended) Conda (Linux/MacOS/Windows)
  13. 1. Create your conda environment (e.g., `elephant_env`):
  14. .. code-block:: sh
  15. conda create --name elephant_env python=3.7 numpy scipy tqdm
  16. 2. Activate your environment:
  17. .. code-block:: sh
  18. conda activate elephant_env
  19. .. tab:: Debian/Ubuntu
  20. Open a terminal and run:
  21. .. code-block:: sh
  22. sudo apt-get install python-pip python-numpy python-scipy python-pip python-six python-tqdm
  23. Installation
  24. ============
  25. .. tabs::
  26. .. tab:: Stable release version
  27. The easiest way to install Elephant is via pip_:
  28. .. code-block:: sh
  29. pip install elephant
  30. To upgrade to a newer release use the ``--upgrade`` flag:
  31. .. code-block:: sh
  32. pip install --upgrade elephant
  33. If you do not have permission to install software systemwide, you can
  34. install into your user directory using the ``--user`` flag:
  35. .. code-block:: sh
  36. pip install --user elephant
  37. To install Elephant with all extra packages, do:
  38. .. code-block:: sh
  39. pip install elephant[extras]
  40. .. tab:: Development version
  41. If you have `Git <https://git-scm.com/>`_ installed on your system,
  42. it is also possible to install the development version of Elephant.
  43. 1. Before installing the development version, you may need to uninstall
  44. the previously installed version of Elephant:
  45. .. code-block:: sh
  46. pip uninstall elephant
  47. 2. Clone the repository and install the local version:
  48. .. code-block:: sh
  49. git clone git://github.com/NeuralEnsemble/elephant.git
  50. cd elephant
  51. pip install -e .
  52. Dependencies
  53. ------------
  54. The following packages are required to use Elephant (refer to requirements_ for the exact package versions):
  55. * numpy_ - fast array computations
  56. * scipy_ - scientific library for Python
  57. * quantities_ - support for physical quantities with units (mV, ms, etc.)
  58. * neo_ - electrophysiology data manipulations
  59. * tqdm_ - progress bar
  60. * six_ - Python 2 and 3 compatibility utilities
  61. These packages are automatically installed when you run ``pip install elephant``.
  62. The following packages are optional in order to run certain parts of Elephant:
  63. * `pandas <https://pypi.org/project/pandas/>`_ - for the :doc:`pandas_bridge <reference/pandas_bridge>` module
  64. * `scikit-learn <https://pypi.org/project/scikit-learn/>`_ - for the :doc:`ASSET <reference/asset>` analysis
  65. * `nose <https://pypi.org/project/nose/>`_ - for running tests
  66. * `numpydoc <https://pypi.org/project/numpydoc/>`_ and `sphinx <https://pypi.org/project/Sphinx/>`_ - for building the documentation
  67. These and above packages are automatically installed when you run ``pip install elephant[extras]``.
  68. .. _`Python`: http://python.org/
  69. .. _`numpy`: http://www.numpy.org/
  70. .. _`scipy`: https://www.scipy.org/
  71. .. _`quantities`: http://pypi.python.org/pypi/quantities
  72. .. _`neo`: http://pypi.python.org/pypi/neo
  73. .. _`pip`: http://pypi.python.org/pypi/pip
  74. .. _Anaconda: https://docs.anaconda.com/anaconda/install/
  75. .. _`Conda environment`: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
  76. .. _`tqdm`: https://pypi.org/project/tqdm/
  77. .. _`six`: https://pypi.org/project/six/
  78. .. _requirements: https://github.com/NeuralEnsemble/elephant/blob/master/requirements/requirements.txt
  79. .. _PyPI: https://pypi.org/