further install info
@@ -42,7 +42,10 @@ You may need to open and close your terminal if you have only just installed
Python.
Installing optional dependencies
---------------------------------
+================================
+
+Primary library optional dependencies
+-------------------------------------
PyMedPhys has a range of optional dependencies. If while using PyMedPhys as
installed above you get ``ImportErrors`` you may install the primary optional
@@ -53,27 +56,78 @@ dependencies for the main library by typing the following:
pip install pymedphys[library]
+Labs optional dependencies
+--------------------------
+
If you would like to use some of the experimental libraries within the labs
-section of PyMedPhys then running the following will install all those optional
-dependencies:
+section of PyMedPhys then running the following will install the optional
+dependencies needed by modules within the labs:
.. code:: bash
pip install pymedphys[labs]
-If you need either ``shapely`` (for the ``pymedphys.electronfactors`` module)
-or ``pymssql`` (for the ``pymedphys.mosaiq`` module) you can either install
-those packages directly yourself using the following methods:
+Difficult optional dependencies
+-------------------------------
+
+``shapely`` for ``pymedphys.electronfactors`` module
+****************************************************
+
+There are two optional dependencies which have some extra complications when
+installing. ``shapely`` can be difficult to install on Windows, and ``pymssql``
+can be difficult to install on MacOS.
+
+If you wish to use the ``pymedphys.electronfactors`` module you will need to
+install ``shapely`` which on MacOS or Linux is as simple as:
+
+.. code:: bash
+
+ pip install shapely
+
+
+On Windows however you will need to download and install a wheel from the
+following site -- <https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely>.
+
+
+``pymssql`` for ``pymedphys.mosaiq`` module
+*******************************************
+
+If you wish to use the ``pymedphys.mosaiq`` module then you will need to
+install a version of ``pymssql`` that is < 3. On Windows and Linux this is
+achieved by running:
+
+.. code:: bash
+
+ pip install pymssql<3
+
+On MacOS installing this dependency is a little more involved and can be
+achieved by first installing both ``freetds`` via ``homebrew`` and ``Cython``.
+To do this follow the steps below:
+
+To install homebrew (as described at <https://brew.sh/>):
+
+.. code:: bash
+
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+
+Then to install ``freetds`` open a new shell, then run:
+
+.. code:: bash
+
+ brew install freetds
+
+And lastly to install cython run:
+
+.. code:: bash
-- ``shapely`` -- <https://github.com/Toblerity/Shapely#installing-shapely-16>
-- ``pymssql`` -- ``pip install pymssql<3`` -- <https://pymssql.readthedocs.io/en/stable/intro.html#getting-started>
+ pip install cython
-or you can try running:
+Then you will be able to successfully run:
.. code:: bash
- pip install pymedphys[difficult]
+ pip install pymssql<3
Installing the Bleeding Edge version of PyMedPhys
