Issues Related to the Python Environment in 3D Slicer Software

Why does 3D Slicer bundle its own Python environment instead of using a user-configured Python environment? Can we modify settings to make 3D Slicer use a custom Python environment?

Short answer is this: think of slicer as the system, as a system it uses its own system installed python.

Slightly long answer is because it would be impossible to maintain functionality across different oses, python versions, package managers, virtual environments and such, and it would break things.

Slicer application’s Python environment is your “user-configured Python environment”. You can configure it as any other Python environments. As @muratmaga described, it would be impractical for you to set up and maintain a custom Python environment that is compatible with the Slicer application.

However, if you just want to import Slicer as a library into your Python environment and use some Slicer features from there (some widgets, algorithms, etc.) then you will be able to use SlicerLib. It is planned to be released around the end of this year.