更新时间:2023-10-18 12:26:04
您应该打开"C:\ Python27 \ lib \ site-packages \ sklearn \ utils \ fixes.py",然后编辑内容.您应该进行两项具体更改:
You should open up "C:\Python27\lib\site-packages\sklearn\utils\fixes.py", and edit the contents. There are two specific changes you should make:
首先,复制并粘贴 https://github.com/scikit-learn/scikit-learn/blob/74a9756fa784d1f22873ad23c8b4948c6e290108/sklearn/utils/fixes.py 放入文件"C:\ Python27 \ lib \ site-packages \ sklearn \ utils \ fixes.py".
First, copy-and-paste the contents of https://github.com/scikit-learn/scikit-learn/blob/74a9756fa784d1f22873ad23c8b4948c6e290108/sklearn/utils/fixes.py into the file "C:\Python27\lib\site-packages\sklearn\utils\fixes.py".
第二,将np_version < (1, 12, 0):
替换为if np_version < (1, 12):
.
More background info and detail available here, in a great answer from user DSM.