Installation
============
Python Package Index (PyPI)
---------------------------
MyMesh can be installed from the `python package index (PyPI) `_:
.. code-block::
pip install mymesh[all]
Installing from source:
-----------------------
Download/clone the repository from `github `_,
then run:
.. code-block::
pip install -e /mymesh[all]
with :code:`` replaced with the file path to the mymesh root directory.
To install with only the required dependencies, the :code:`[all]` can be omitted.
To install additional dependencies used for testing, documentation, and benchmarking,
.. code-block::
pip install -e /mymesh[all,test]
Dependencies
------------
MyMesh depends on a small number of built-in or well established python packages.
Additionally, there are several optional dependencies that are required only for
specific functions or use-cases.
Core dependencies
^^^^^^^^^^^^^^^^^
================ ======================
Package Install
================ ======================
`numpy`_ ``pip install numpy``
`scipy`_ ``pip install scipy``
`sympy`_ ``pip install sympy``
================ ======================
Optional dependencies
^^^^^^^^^^^^^^^^^^^^^
======================= ==================== ================================================================================================= =============================
Package Purpose Used in Install
======================= ==================== ================================================================================================= =============================
`numba`_ Enhanced efficiency :mod:`~mymesh.delaunay`, :mod:`~mymesh.utils`, :mod:`~mymesh.improvement`, :mod:`~mymesh.quality` ``pip install numba``
`meshio`_ Mesh file I/O :class:`~mymesh.mesh` ``pip install meshio``
`pydicom`_ DICOM image file I/O :mod:`~mymesh.image` ``pip install pydicom``
`tifffile`_ TIFF image file I/O :mod:`~mymesh.image` ``pip install tifffile``
`opencv (cv2)`_ [#f1]_ Image file I/O :mod:`~mymesh.image` ``pip install opencv-python``
`triangle`_ Constrained Delaunay :mod:`~mymesh.delaunay` ``pip install triangle``
`vispy`_ Mesh visualization :mod:`~mymesh.visualize` ``pip install vispy``
`matplotlib`_ Mesh visualization :mod:`~mymesh.visualize` ``pip install matplotlib``
`pillow`_ Mesh visualization :mod:`~mymesh.visualize` ``pip install pillow``
`jupyter_rfb`_ Mesh visualization :mod:`~mymesh.visualize` ``pip install jupyter_rfb``
`colorspacious`_ Mesh visualization :mod:`~mymesh.visualize` ``pip install colorspacious``
`pyvista`_ Mesh visualization :class:`~mymesh.mesh` ``pip install pyvista``
`triangle`_ Triangulation :mod:`~mymesh.delaunay` ``pip install triangle``
`tetgen`_ Tetrahedralization :mod:`~mymesh.delaunay` ``pip install tetgen``
======================= ==================== ================================================================================================= =============================
MyMesh can be used without these optional dependencies and if a function requires them, an error will be raised instructing the user to install the needed dependency.
.. _numpy: https://numpy.org/
.. _scipy: https://scipy.org/
.. _sympy: https://sympy.org/
.. _meshio: https://github.com/nschloe/meshio
.. _numba: http://numba.pydata.org/
.. _pydicom: https://github.com/pydicom/pydicom
.. _tifffile: https://github.com/cgohlke/tifffile/
.. _opencv (cv2): https://github.com/opencv/opencv-python
.. _triangle: https://github.com/drufat/triangle
.. _vispy: https://vispy.org/
.. _matplotlib: https://matplotlib.org/
.. _pillow: https://github.com/python-pillow/Pillow
.. _jupyter_rfb: https://github.com/vispy/jupyter_rfb
.. _colorspacious: https://github.com/njsmith/colorspacious
.. _pyvista: https://pyvista.org/
.. _triangle: https://github.com/drufat/triangle
.. _tetgen: https://github.com/pyvista/tetgen
.. [#f1] OpenCV may require additional non-python libraries on some operating systems (for example libgl1-mesa-dev, libglib2.0-0).