Operating system: ubuntu16.04
Expected behavior:Non error messages
Actual behavior:Error(s): Failed to find python interpreter for CLI
I’m a beginner at python and 3D slicer.
When I activate the 3D slicer from the terminal, I get the following error message:
Failed to find python interpreter for CLI: /home/ueda/bin/Slicer-SuperBuild/Slicer-build/lib/Slicer-4.11/cli-modules/PyCLIModule4Test.py
Fail to instantiate module “PyCLI4Test”
Object::connect: No such signal qSlicerGPUMemoryComboBox::currentTextChanged(QString) in /home/ueda/bin/Slicer/Modules/Loadable/VolumeRendering/qSlicerVolumeRenderingSettingsPanel.cxx:116
Object::connect: (sender name: ‘GPUMemoryComboBox’)
Object::connect: (receiver name: ‘qSlicerVolumeRenderingSettingsPanel’)
Switch to module: “Welcome”
How can I solve this error message?
Python CLIs are only available if Slicer is built with Qt5.
@ihnorton, What’s the reason behind trying to find “python” executable here? Can the CLI executed by an any Python interpreter? How do you tell if you want to run the Python file using Slicer’s Python interpreter or another one?
That was to make it work with a local build.
I don’t think there is a way to do that right now. A couple ideas:
- tell people to use the PyCLI as a wrapper to call some other arbitrary command with the correct environment, arguments, etc.
- do what
bash does: parse the
#! line, use that as either absolute path or a target to search for in PATH (ignoring
/usr/bin/env if present, at least on Windows). This would be nice because it would work for arbitrary interpreters, but would be tricky because people would need to either arrange their PATH properly, or use an install-step to put the correct absolute path in place (this is what anaconda does, and it works very well).
ModuleDescription: then people could call
setEntryPointon the CLI object as needed (actually this might already be possible with a