Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macOS instructions to readme #32

Open
jsparedes opened this issue Apr 25, 2021 · 1 comment
Open

Add macOS instructions to readme #32

jsparedes opened this issue Apr 25, 2021 · 1 comment

Comments

@jsparedes
Copy link

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
Copy link
Author

jsparedes commented Apr 25, 2021

Maybe this could help someone with these configuration:

  • Operative System version: macOS Big Sur 11.2.3

  • QGIS: 3.16.5-Hannover

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:

  • The print message is /Applications/QGIS-LTR.app/Contents/MacOS/QGIS
  • And the python_qgis_path is /Applications/QGIS-LTR.app/Contents/MacOS/bin/python3

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant