Skip to content

Loading SlicerSOFA fails when an installation of SOFA is present in the system (Windows) #41

@RafaelPalomar

Description

@RafaelPalomar

SlicerSOFA will fail to load when an installation of SOFA is present in the system. This behaviour has been captured on MS Windows (maybe other OS are also affected). The problem is caused by the way we set the paths when loading SlicerSOFA. Particularly on the following lines:

    sys.path.append(script_dir + '/../../../../plugins/SofaPython3/lib/python3/site-packages')
    sys.path.append(script_dir + '/../../../../plugins/STLIB/lib/python3/site-packages')

With this code, existing sofa paths will be preceding, thus causing the problem (this was reported by @DomenicoRiggio during ProjectWeek 42nd (https://projectweek.na-mic.org/PW42_2025_GranCanaria/). A solution to this problem is prepending the new SlicerSOFA paths, instead of appending them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions