Skip to content

SimpleITK is not available on Windows if Slicer is installed in a path that contains special characters #5383

Description

@lassoan

SimpleITK is not available if Slicer is installed in a path that contains special (non-ASCII) characters.

The reason is that CPython 3.6 on Windows does not correctly compute "sys.prefix" if the path contains non-ASCII characters, therefore lib\Python\Lib\site-packages\easy-install.pth is not found (which adds ./simpleitk-2.0.0-py3.6-win-amd64.egg to the search path at startup) and so SimpleITK's egg is not found.

Steps to reproduce

  • Install (or copy) Slicer into a subfolder named "Félix".
  • Start Slicer
  • Type import SimpleITK in the Python console => SimpleITK module is not found

Prefix folder path can be printed using these commands:

import sys
sys.prefix

Expected behavior

SimpleITK should be found.

Environment

  • Slicer version: Slicer-4.11.20200930
  • Operating system: Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working correctly

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions