pycharm集成环境中关于安装sklearn库报错问题分析及解决

在输入pip install sklearn后,出现如下提示:

python 复制代码
pip install sklearn

Collecting sklearn Using cached sklearn-0.0.post12.tar.gz (2.6 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully.

│ exit code: 1 ╰─> 15 lines of output The 'sklearn' PyPI package is deprecated, use 'scikit-learn' rather than 'sklearn' for pip commands. Here is how to fix this error in the main use cases: - use 'pip install scikit-learn' rather than 'pip install sklearn' - replace 'sklearn' by 'scikit-learn' in your pip requirements files (requirements.txt, setup.py, setup.cfg, Pipfile, etc ...) - if the 'sklearn' package is used by one of your dependencies, it would be great if you take some time to track which package uses 'sklearn' instead of 'scikit-learn' and report it to their issue tracker - as a last resort, set the environment variable SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True to avoid this error More information is available at https://github.com/scikit-learn/sklearn-pypi-package end of output

在翻译原文后,得出:

收集 sklearn

正在使用缓存的 sklearn-0.0.post12.tar.gz (2.6 kB)

正在安装构建依赖项... 完成

获取构建轮子的需求... 出错

错误:子进程退出并出现错误

× 获取构建轮子的需求未成功运行。

│ 退出代码:1

╰─> 15 行输出

PyPI 上的 'sklearn' 包已被弃用,请使用 'scikit-learn'

而不是 'sklearn' 来执行 pip 命令。

便使用如下代码继续尝试:

python 复制代码
pip install scikit-learn

结束!!!

相关推荐
游戏开发爱好者84 小时前
iPhone真机调试有哪些方法?一次定位推送权限问题时整理出来的几种方案
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
爱吃苹果的梨叔5 小时前
2026年KVM over IP采购指南:BIOS级接管、并发和审计怎么验收
ide·python·tcp/ip·github
OsDepK5 小时前
获取免费API讯飞星辰maas平台
ide·github
invicinble8 小时前
对于使用qoder --ai ide相关使用心得
ide·人工智能
syc789012310 小时前
Vibe Coding实战对比:终端迭代与可视化AI IDE的真实开发差异
大数据·ide·人工智能
蜗牛旅行10 小时前
trae快捷键记录
ide
石头城的小石头1 天前
【从0到1的鼠标位置显示记录器,基于python环境pycharm下编译实施,最终打包为exe,欢迎交流】
python·目标跟踪·pycharm·计算机外设·鼠标
Ycocol1 天前
AS同一个目录下的类导入导入其他类爆红无法跳转但是可以编译
android·ide·android studio
m沐沐1 天前
【计算机视觉】OpenCV 模板匹配银行卡数字识别---上
人工智能·后端·python·opencv·计算机视觉·pycharm·numpy
Mars-xq1 天前
vscode 开发Android
android·ide·vscode