Skip to main content
3 of 3
Edited to a single specific question.
Nick
  • 91
  • 1
  • 7

Semi-Automatic Classification Plugin Scipy Dependency Error

I've been using QGIS with the Semi-Automatic Classification plugin (SCP) at work, and am attempting to install and use it at home. Unfortunately, I am encountering an error which causes QGIS to crash when installing, disabling, or uninstalling SCP.

Upon opening QGIS 2.18.6, I get the following messages:

Semi-Automatic Classification Plugin: Please, restart QGIS for executing the Semi-Automatic Classification Plugin. Possible missing dependecies: SciPy

Semi-Automatic Classification Plugin: Please, restart QGIS for executing the Semi-Automatic Classification Plugin

From investigating the plugin's source, it looks like it is trying the following import before throwing the SciPy dependency exception:

import scipy.stats.distributions as statdistr

I tried the same import from the OSGeo4W Shell, and get the following traceback:

Taceback (most recen call last):
  File "<stdin>", line 1, in <module>
  File "C:\OSGEO4~1\apps\Python27\lib\site-packages\scipy\stats\__init__.py", line 334,
    in <module> from .stats import *
  File "C:\OSGEO4~1\apps\Python27\lib\site-packages\scipy\stats\stats.py", line 181,
    in <module> import scipy.special as special
  File "C:\OSGEO4~1\apps\Python27\lib\site-packages\scipy\special\__init__.py", line 546,
    in <module> from ._ufuncs import *

Additionally, doing a pip list does not display scipy but does display numpy and matplotlib, the other two dependencies for the plugin.

I've attempted to reinstall QGIS and supporting apps / libraries using the advanced and express installers, but run into the same problem each time I try to install SCP. The error also causes QGIS to crash and write a minidump on close. I'm also using Windows 10.


I am able to import scipy from the OSGeo4W Shell, but any module imports do not work, i.e. import scipy.stats or import scipy.linalg

How can I resolve this specific Scipy dependency issue within QGIS?

Nick
  • 91
  • 1
  • 7