Bug report #20958

QGIS 3.4.3 and Semi-automatic Classification Plug In matpliglib not installed

Added by David G Nicholls over 5 years ago. Updated over 5 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Unknown
Affected QGIS version:3.4.3 Regression?:No
Operating System:Mac OS 10.14.2 Easy fix?:No
Pull Request or Patch supplied:No Resolution:invalid
Crashes QGIS or corrupts data:No Copied to github as #:28777

Description

With QGIS 3.4.3 newly installed and following the installation of SCP from QGIS, QGIS consistently and repeated (despite many various installations over three days) reports matplotlib not installed.

When I ran from the terminal, "sudo -H pip3 install matplotlib", QGIS worked with SCP.
Luca, author of SCP, suggested that QGIS may not have loaded the necessary dependencies.

History

#1 Updated by Giovanni Manghi over 5 years ago

  • Category changed from Plugin Manager to Unknown
  • Assignee deleted (David G Nicholls)
  • Resolution deleted (wontfix)

You must check for the python console (not in QGIS, but the same python used by QGIS) if you can import that module, if not then is not a QGIS issue.

#2 Updated by Paolo Cavallini over 5 years ago

  • Subject changed from QGIS 3.4.3 and Simi-automatic Classification Plug In matpliglib not installed to QGIS 3.4.3 and Semi-automatic Classification Plug In matpliglib not installed
  • Status changed from Open to Feedback

Do you mean matplotlib?

#3 Updated by Luca Congedo over 5 years ago

Hello Giovanni and Paolo, I believe the issue is related to missing dependencies in MacOS such as Matplotlib that are usually included with QGIS (at least in the Windows version).

#4 Updated by Giovanni Manghi over 5 years ago

Luca Congedo wrote:

Hello Giovanni and Paolo, I believe the issue is related to missing dependencies in MacOS such as Matplotlib that are usually included with QGIS (at least in the Windows version).

Hi Luca,
as far as I can see Matplotlib is not a qgis dependency. I just tried with a clean install on Windows/OGseo4w.
I have no more access to a macOS platform, but I'm almost sure (from my times as tester at Boundless) that the suggested way to install matplotlib was to use pip.

#5 Updated by David G Nicholls over 5 years ago

Thanks Giovanni,

The issue is the combination of QGIS - the plugin semi-automatic classification - Mac installation. I too can make the Windows 64bit installation work. The Windows installation does not require separate installation of python modules.
However, the QGIS 3.4.3 Mac installation requires the user to install three python modules first before running the QGIS installation.
I believe I did this correctly. However it did not work for me. Luca suggested alternate ways to install matplotlib. One of those did appear to install matplotlib, however the plugin still did not work.

Please can we refer this request to someone with a Mac OS.

I am using an emulation to run the Windows version (on my Mac) and while that restored faith and function, I would welcome success in the Mac environment.

Thanks for your time and effort.
David

#6 Updated by Giovanni Manghi over 5 years ago

Hi there,

David G Nicholls wrote:

Thanks Giovanni,

The Windows installation does not require separate installation of python modules.

it depends on what modules, not all modules that are in osgeo4w are bundled with the standalone installer, and if a module is not in the psgeo4w installer than it needs to be installed using an alternative way, like using pip in the osgeo4w console.

However, the QGIS 3.4.3 Mac installation requires the user to install three python modules first before running the QGIS installation.

really? or this statement is about having the SCP plugin?

I believe I did this correctly. However it did not work for me. Luca suggested alternate ways to install matplotlib. One of those did appear to install matplotlib, however the plugin still did not work.

Please can we refer this request to someone with a Mac OS.

I am using an emulation to run the Windows version (on my Mac) and while that restored faith and function, I would welcome success in the Mac environment.

you must check in the qgis python console, can you import matplotlib from there?
how have you installed matplotlib, with pip?

#7 Updated by Giovanni Manghi over 5 years ago

Giovanni Manghi wrote:

Hi there,

David G Nicholls wrote:

Thanks Giovanni,

The Windows installation does not require separate installation of python modules.

it depends on what modules, not all modules that are in osgeo4w are bundled with the standalone installer, and if a module is not in the psgeo4w installer than it needs to be installed using an alternative way, like using pip in the osgeo4w console.

However, the QGIS 3.4.3 Mac installation requires the user to install three python modules first before running the QGIS installation.

really? or this statement is about having the SCP plugin?

I believe I did this correctly. However it did not work for me. Luca suggested alternate ways to install matplotlib. One of those did appear to install matplotlib, however the plugin still did not work.

Please can we refer this request to someone with a Mac OS.

I am using an emulation to run the Windows version (on my Mac) and while that restored faith and function, I would welcome success in the Mac environment.

you must check in the qgis python console, can you import matplotlib from there?
how have you installed matplotlib, with pip?

you sure you have installed matplotlib for the python3 installation that qgis uses?

#8 Updated by David G Nicholls over 5 years ago

Giovanni

Yes, I was sure matplotlib was installed. The command line installations reported success; the SCP Debug test routine reported success (for that and other python required modules).

However, after considering all the advice, I deleted all the QGIS, SCP and python installations and started afresh using the official repositories for the Mac OS versions of Python, QGIS and the plugin. That was successful.

I do not have a sufficiently detailed record of my history so I am unsure what I did wrong.

Thank you for your help.
David

#9 Updated by Giovanni Manghi over 5 years ago

  • Resolution set to invalid
  • Status changed from Feedback to Closed

Also available in: Atom PDF