nkarasiak / dzetsaka

dzetsaka : classification plugin for Qgis
GNU General Public License v3.0
80 stars 20 forks source link

Add macOS instructions to readme #32

Open jsparedes opened 3 years ago

jsparedes commented 3 years ago

There is no instruction available for macOS.

There is a pending pull request from #25 (tested with macOS 10.13.6 (High Sierra) and 10.15.5 (Catalina), QGIS 3.10.) Also, there is an open issue #10 but related to qgis2.

jsparedes commented 3 years ago

Maybe this could help someone with these configuration:

The short answer:

In our computer console:

python_qgis_path -m pip install -U pip

python_qgis_path -m pip install -U scikit-learn

Where python_qgis_path is the python used in QGIS. In my case python_qgis_path is /Applications/QGIS-LTR.app/Contents/MacOS/QGIS/bin

A detailed answer

The python_qgis_path can be deduced from the Python Console from QGIS:

import sys
print(sys.executable)
image

In my case:

When I run the python_qgis_path in my computer console, I get:

image

In my computer, when I tried python_qgis_path -m pip install -U scikit-learn i got an error with the Numpy dependency. Update the pip version is a way to handle this.

For this, reason I executed:

/Applications/QGIS-LTR.app/Contents/MacOS/QGIS/bin -m pip install -U pip

/Applications/QGIS-LTR.app/Contents/MacOS/QGIS/bin -m pip install -U --ignore-installed scikit-learn

Due my previous attempt with scikit-learn, I had to add the flag --ignore-installed