Slicer-Python Packages Use and Install

For Slicer 4.10 I would probably suggest opening a terminal window to the location of PythonSlicer and doing PythonSlicer.exe -m pip install scipy. The error you are getting is because the “pip” package was updated and “main” was moved out. You could try some work around as was suggested earlier in this discussion such as

from pip._internal import main as pipmain
pipmain(['install','scipy'])

If using Slicer 4.11, Slicer is now using Python3. You could also use a helper function within Slicer’s python interactor. Try slicer.util.pip_install('scipy').
Reference: Use full power of Python in Slicer

Note: If you install scipy in Slicer 4.10, which is using python2, you will not be using the latest version of scipy (1.3.0). Scipy 1.3.0 is only available for Python3.

1 Like