cmake-basis/BASIS

basis for MASS-1.1.0

zswgzx opened this issue · 2 comments

Hi experts,

I'm trying to install MASS 1.1.0, which requires Basis. I've installed all the prerequisites Mass needs, but failed to install it when ccmake gave:

  • CMake Error at /opt/cmake-basis/share/find-modules/FindPythonModules.cmake:345
    (message):
    Could NOT find the following Python modules:

    nibabel;numpy;sklearn;sklearn.cluster

    Check if executing /home/xxx/anaconda3/bin/python -c "import "
    works or set the PythonModules_DIR variable. Alternatively, set the
    PythonModules__PATH variable(s) instead or the PYTHONPATH
    environment variable. Unset PythonModules_DIR if you chose an alternative
    option and before rerunning CMake again.
    Call Stack (most recent call first):
    /opt/cmake-basis/share/modules/CommonTools.cmake:56 (_find_package)
    /opt/cmake-basis/share/modules/CommonTools.cmake:691 (find_package)
    /opt/cmake-basis/share/modules/ProjectTools.cmake:2181 (basis_find_package)
    /opt/cmake-basis/share/modules/ProjectTools.cmake:2475 (basis_find_packages)
    /opt/cmake-basis/share/modules/ProjectTools.cmake:2751 (basis_project_begin)
    CMakeLists.txt:48 (basis_project_impl)

But I'm able to import all these python libraries from anaconda3.
Is there anything I miss?

Also, some settings in ccmake below:

  • BASIS_DIR /opt/cmake-basis/lib/cmake/basis
    CMAKE_BUILD_TYPE Release
    CMAKE_INSTALL_PREFIX /opt/mass
    DEPENDS_DRAMMS_DIR /home/xxx/work/software/dramms-1.4.1
    DEPENDS_PythonInterp_DIR /home/xxx/anaconda3/bin
    DEPENDS_PythonModules_DIR

What would be suitable to put to the last config? Tried /home/xxx/anaconda3/lib, but still the same issue.

Any help would be highly appreciated.

Hi, sorry you encountered this issue. As this should merely be a check of module existence, and there seems to be some variables not set correctly internally, you could try a simple work-around:

Edit the BasisProject.cmake file in the top-level directory of the MASS source tree, and remove / comment out the line PythonModules{nibabel;numpy;sklearn;sklearn.cluster}.

You should then be able to proceed with configuring and installing the software.

Works well. Thanks!