gpt4 book ai didi

python - sklearn已安装但无法导入

转载 作者:行者123 更新时间:2023-11-30 09:59:46 28 4
gpt4 key购买 nike

enter image description here

当我尝试导入 sklearn 时,出现以下错误。

请查找以下错误跟踪以了解更多详细信息:


C:\Users\Priyanshu\AppData\Local\Programs\Python\Python37-32\Lib\site-packages> pip install sklearn Requirement already satisfied: sklearn in c:\users\priyanshu\appdata\local\programs\python\python37-32\lib\site-packages (0.0)
Requirement already satisfied: scikit-learn in c:\users\priyanshu\appdata\local\programs\python\python37-32\lib\site-packages (from sklearn) (0.22)
Requirement already satisfied: numpy>=1.11.0 in c:\users\priyanshu\appdata\local\programs\python\python37-32\lib\site-packages (from scikit-learn->sklearn) (1.17.2)
Requirement already satisfied: joblib>=0.11 in c:\users\priyanshu\appdata\local\programs\python\python37-32\lib\site-packages (from scikit-learn->sklearn) (0.14.1)
Requirement already satisfied: scipy>=0.17.0 in c:\users\priyanshu\appdata\local\programs\python\python37-32\lib\site-packages (from scikit-learn->sklearn) (1.3.1)
PS C:\Users\Priyanshu\AppData\Local\Programs\Python\Python37-32\Lib\site-packages> python Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 19:29:22) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

>>> import sklearn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Priyanshu\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\sklearn\__init__.py", line 75, in <module>
from .utils._show_versions import show_versions
File "C:\Users\Priyanshu\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\sklearn\utils\_show_versions.py", line 12, in <module>
from ._openmp_helpers import _openmp_parallelism_enabled
ImportError: DLL load failed: The specified module could not be found.
>>>

最佳答案

通过安装 0.22 以下的 sklearn 可以修复相同的错误。请尝试以下命令。

pip install scikit-learn==0.21.3

关于python - sklearn已安装但无法导入,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59487612/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com