-
Notifications
You must be signed in to change notification settings - Fork 20
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
Failed to recognize scikit-learn in qgis 3.6 for ubuntu #15
Comments
Helllo,
|
Traceback (most recent call last): |
Hello, How did you install Qgis in ubuntu ? Because normally dependences installed in Ubuntu (pip/sklearn in python...) are shared inside Qgis environment. I'm not an expert of this, but try to install pip in the Qgis environment (I see differences between |
@Watxtract-Christina , do you find a way to install scikit-learn since ? |
I installed scikit-learn for QGIS 3.4 using pip3 instead of pip, because I have both python 2 and 3, and since QGIS 3+ versions are based on python 3, I guess this should work for you. Also, thinking of lennepkade's comment, I have these paths:
|
Hello, I found that the problem isn't due to sklearn install, but it is much more deep...or should I say recursive. "RecursionError: maximum recursion depth exceeded while calling a Python object". I was able to catch it by adding a 'raise' in the dzetsaka.py file. It looks pretty similar to an issue I opened on the QGIS repo (see qgis/QGIS#33612 ) : there is no way to import pandas after qgis.core. |
I was able to fix it with a newer version of sklearn. In Debian10 or Ubuntu18, the default version installed with apt is 0.20.x . |
Hello @vidlb , Thanks for the feedback and for the solution ! @Watxtract-Christina and @ppopoca , if you still have scikit-learn issues (sklearn not found), can you type this in the OSGEO : The -U forces the update of scikit-learn, as @vidlb found that maybe the problem came from version 0.20.*. In any case, can you tell me if you found a successful solution ? Or if you still failed to use sklearn ? |
Successfully tested with macOS 10.13.6 (High Sierra) and 10.15.5 (Catalina), QGIS 3.10. Solution from this comment: nkarasiak#15 (comment). Not sure if restart is actually required. In macOS High Sierra, QGIS was not responidng during the classifiation but still succeeded.
When I tried to run SVM in qgis using the plugin, I got the library missing message "Scikit-learn library is missing on your computer." Although I have scikit-learn in my system:
Requirement already satisfied: scikit-learn in ./.local/lib/python3.6/site-packages (0.20.3)
Requirement already satisfied: scipy>=0.13.3 in ./.local/lib/python3.6/site-packages (from scikit-learn) (1.2.1)
Requirement already satisfied: numpy>=1.8.2 in ./.local/lib/python3.6/site-packages (from scikit-learn) (1.16.2)
How to let QGIS recognize the library?
System: ubuntu 18.04.
Try type:import sklearn in python console in qgis, it seems the scikit-learn is not installed in qgis.
The text was updated successfully, but these errors were encountered: