You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have a module named scikit-learn installed. when I call IsModuleInstalled() it should return true. The function assumes that the module is in a folder named scikit-learn in site-packages folder. But the actual folder name is scikit_learn. Thus the function always returns false.
@henon The only way to resolve this is by looking into the site-packages folder and do a lookup to determine if scikit-learn or scikit_learn is present. Same issue happens with py-linq (https://pypi.org/project/py-linq/).
Alternatively the scikit_learn module name could be used but from my testing, in both cases (scikit-learn and scikit_learn), the corresponding folder is not present in the site-packages folder.
Activity
henon commentedon May 14, 2021
Please describe the problem in detail. Also, are you proposing a solution?
ijsankar commentedon May 14, 2021
If I have a module named scikit-learn installed. when I call IsModuleInstalled() it should return true. The function assumes that the module is in a folder named scikit-learn in site-packages folder. But the actual folder name is scikit_learn. Thus the function always returns false.
henon commentedon May 14, 2021
I see. But how do we solve that problem?
JimiC commentedon Jun 23, 2022
@henon The only way to resolve this is by looking into the
site-packagesfolder and do a lookup to determine ifscikit-learnorscikit_learnis present. Same issue happens withpy-linq(https://pypi.org/project/py-linq/).Alternatively the
scikit_learnmodule name could be used but from my testing, in both cases (scikit-learnandscikit_learn), the corresponding folder is not present in thesite-packagesfolder.henon commentedon Jun 23, 2022
So all we gotta do is check for either snake_case or kebab-case?
JimiC commentedon Jun 23, 2022
That seems to be the case with
pythonlibrary naming.Maybe using a Regex would be more useful.
JimiC commentedon Jun 23, 2022
Looking at it again I think that's something that
pythonnetshould resolve, right?