Skip to content

Commit

Permalink
Merge pull request #129 from loli/HOTFIXES_release
Browse files Browse the repository at this point in the history
Hotfixes release
  • Loading branch information
loli committed Apr 3, 2024
2 parents 91b288c + 4b83d7a commit 6eb7c15
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 8 deletions.
6 changes: 6 additions & 0 deletions CHANGES.txt
@@ -1,3 +1,9 @@
v0.5.0, 2024-04-XX -- Addressed all depreciation warnings and incompatabilities
Updated documentation
Updated and fixed tests
Added github workflows as system
Introduced formatting rules and pre-commit to enforce them
Removed dockerfile creation files
v0.4.0, 2018-02-XX -- Switched to Python 3: finally compatible with modern development environements
Switched to simple itk for image loading/saving: read dicom series, more formats, less dependencies, cleaner code, easier to maintain
Documentation: installation instructions for Windows and OsX
Expand Down
11 changes: 3 additions & 8 deletions doc/source/installation/conda.rst
Expand Up @@ -2,15 +2,10 @@
Installing MedPy with Conda
===========================

**MedPy** does not come with an official conda package.
But you can nevertheless install it into a conda environement using *pip* after resolving the dependencies.
**MedPy** can be installed from `conda forge <https://anaconda.org/conda-forge/medpy>`:

.. code-block:: bash
conda install -c simpleitk simpleitk
python3 -m pip install medpy
conda install conda-forge::medpy
Note that the graph-cut package won't compile in the conda environement due to unmet dependencies.

For conda-purists: The friendly folks from `bioconda <https://bioconda.github.io/>`_ wrapped the previous (0.3.0) version of **MedPy**
into their distribution system (see https://anaconda.org/bioconda/medpy).
Note that the graph-cut package might not compile in the conda environement due to unmet dependencies.
31 changes: 31 additions & 0 deletions doc/source/installation/graphcutsupport.rst
Expand Up @@ -18,3 +18,34 @@ These dependencies can be found in the repositories of all major distribution. F
sudo apt-get install libboost-python-dev build-essential
Then install **MedPy** the usual way.

Troubleshooting
---------------

If you experience an error like `ModuleNotFoundError: No module named 'medpy.graphcut.maxflow'`, this usually means
that the `graphcut`` module has not been compiled successfully. To check the error log, try re-installing **MedPy** with:

.. code-block:: bash
pip install medpy --no-cache-dir --force-reinstall -v
In the logs, you might see the following warning:

.. code-block:: bash
2021-06-30T11:07:32,684 ***************************************************************************
2021-06-30T11:07:32,685 WARNING: The medpy.graphcut.maxflow external C++ package could not be compiled, all graphcut functionality will be disabled. You might be missing Boost.Python or some build essentials like g++.
2021-06-30T11:07:32,685 Failure information, if any, is above.
2021-06-30T11:07:32,685 I'm retrying the build without the graphcut C++ module now.
2021-06-30T11:07:32,685 ***************************************************************************
The error should be detailed in the lines just above.
Usually, it is a problem with the linking of the `(lib)boost_python3`` lib.
There are some inconsistent naming conventions around, rendering the file undiscoverable to **MedPy**.
On Ubuntu, you should be able to locate your *libboost_python3x.so* under `/usr/lib/x86_64-linux-gnu/`.
If your shared library file is named differently than **MedPy** expects, you might have to create a softlink like, e.g.:
.. code-block:: bash
sudo ln -s libboost_python38.so libboost_python3.so

0 comments on commit 6eb7c15

Please sign in to comment.