sigopt / sigopt-sklearn

SigOpt wrappers for scikit-learn methods
MIT License
75 stars 11 forks source link

Unable to Import Modules #34

Open AbhijeetK-Novelis opened 3 years ago

AbhijeetK-Novelis commented 3 years ago

Hello Team,

I am running into errors while trying to import modules from the library.

Import statement: from sigopt_sklearn.search import SigOptSearchCV

Error:

ImportError                               Traceback (most recent call last)
<ipython-input-2-031260a92d5b> in <module>
----> 1 from sigopt_sklearn.search import SigOptSearchCV

~\Anaconda3\envs\sigopt\lib\site-packages\sigopt_sklearn\search.py in <module>
     12 import numpy
     13 from joblib import Parallel, delayed
---> 14 from joblib.func_inspect import getfullargspec
     15 
     16 try:

ImportError: cannot import name 'getfullargspec' from 'joblib.func_inspect' (C:\******\Anaconda3\envs\sigopt\lib\site-packages\joblib\func_inspect.py)


Import statement: from sigopt_sklearn.ensemble import SigOptEnsembleClassifier

Error:

OSError                                   Traceback (most recent call last)
<ipython-input-3-1a36f5fb4231> in <module>
----> 1 from sigopt_sklearn.ensemble import SigOptEnsembleClassifier

~\Anaconda3\envs\sigopt\lib\site-packages\sigopt_sklearn\ensemble.py in <module>
     11 
     12 import numpy as np
---> 13 from sklearn.base import ClassifierMixin
     14 from sklearn.utils.validation import check_array
     15 

~\Anaconda3\envs\sigopt\lib\site-packages\sklearn\__init__.py in <module>
     62 else:
     63     from . import __check_build
---> 64     from .base import clone
     65     from .utils._show_versions import show_versions
     66 

~\Anaconda3\envs\sigopt\lib\site-packages\sklearn\base.py in <module>
     10 
     11 import numpy as np
---> 12 from scipy import sparse
     13 from .externals import six
     14 from .utils.fixes import signature

~\Anaconda3\envs\sigopt\lib\site-packages\scipy\__init__.py in <module>
    128 
    129     # Allow distributors to run custom init code
--> 130     from . import _distributor_init
    131 
    132     from scipy._lib import _pep440

~\Anaconda3\envs\sigopt\lib\site-packages\scipy\_distributor_init.py in <module>
     57             os.chdir(libs_path)
     58             for filename in glob.glob(os.path.join(libs_path, '*dll')):
---> 59                 WinDLL(os.path.abspath(filename))
     60         finally:
     61             os.chdir(owd)

~\Anaconda3\envs\sigopt\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
    362 
    363         if handle is None:
--> 364             self._handle = _dlopen(self._name, mode)
    365         else:
    366             self._handle = handle

OSError: [WinError 126] The specified module could not be found

/cc @ethanchaNovelis @amitdingareNovelis

Jiansiyu commented 3 years ago

It seems like this is caused by the joblib version. I test joblib version 0.14.1, everything works well under python3.7 on ubuntu20.01. #35