Open yefeister opened 2 years ago
pip install Scikit-learn==0.20.4 -i https://pypi.tuna.tsinghua.edu.cn/simple
现在好像直接pip install joblib了,不包含在sklearn的包里了,然后直接import joblib
请问解决了嘛,怎么解决的,我也是这个问题
现在好像直接pip install joblib了,不包含在sklearn的包里了,然后直接import joblib
直接import joblib好像也会报错ModuleNotFoundError: No module named 'sklearn'
运行kbqa_test.py,出现错误:ModuleNotFoundError: No module named 'sklearn.externals.joblib' in module pickle.py. 我的版本是python3.10. Traceback (most recent call last): File "C:\Users\Documents\QASystemOnMedicalGraph-master\kbqa_test.py", line 27, in
handler = KBQA()
File "C:\Users\Documents\QASystemOnMedicalGraph-master\kbqa_test.py", line 10, in init
self.extractor = EntityExtractor()
File "C:\Users\Documents\QASystemOnMedicalGraph-master\entity_extractor.py", line 23, in init
self.tfidf_model = joblib.load(self.tfidf_path)
File "C:\Users\Documents\QASystemOnMedicalGraph-master\venv\lib\site-packages\joblib\numpy_pickle.py", line 587, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "C:\Users\Documents\QASystemOnMedicalGraph-master\venv\lib\site-packages\joblib\numpy_pickle.py", line 506, in _unpickle
obj = unpickler.load()
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1213, in load
dispatchkey[0]
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1529, in load_global
klass = self.find_class(module, name)
File "C:\Users\AppData\Local\Programs\Python\Python310\lib\pickle.py", line 1580, in find_class
import(module, level=0)
ModuleNotFoundError: No module named 'sklearn.externals.joblib'