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

结束!!!

相关推荐
大嘴皮猴儿24 分钟前
从零开始学商品图翻译:小白也能快速掌握的多语言文字处理与上架技巧
大数据·ide·人工智能·macos·新媒体运营·xcode·自动翻译
萑澈5 小时前
vscode怎么关闭点击音效
ide·vscode·编辑器
Freak嵌入式6 小时前
MicroPython对接大模型:uopenai + 火山方舟实现文字聊天和图片理解
ide·驱动开发·ai·llm·嵌入式·micropython·upypi
摇滚侠1 天前
帮我整理一份 IDEA 开发中常用快捷键
java·ide·intellij-idea
HuDie3401 天前
agent项目实操笔记
ide
梦魇星虹1 天前
idea Cannot find declaration to go to
java·ide·intellij-idea
xifangge20251 天前
【故障排查】IDEA 打开 Java 文件没有运行按钮(Run)?深度解析项目标识与环境配置的 3 大底层坑点
java·ide·intellij-idea
刘延林.1 天前
Visual Studio Code+PlatformIO + ESP32-S3 + Arduino 框架点亮一个小的led灯-测试
ide·vscode·编辑器
黑客大白1 天前
IDEA安装教程配置java环境(超详细)_idea配置java,零基础入门到精通,收藏这篇就够了
java·ide·intellij-idea
Dontla1 天前
VSCode插件Git Graph介绍(Git可视化管理分支、可视化Git)
ide·git·vscode