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

结束!!!

相关推荐
唐璜Taro5 小时前
VSCode接入小米mimo大模型
ide·vscode·编辑器
古怪今人6 小时前
Android Studio的安装及配置 创建项目编译、运行、调试、打包安装包
android·ide·android studio
2501_916008897 小时前
ChatGPT前端开发学习指南:Visual Studio Code与谷歌浏览器安装配置详解
ide·vscode·ios·小程序·uni-app·编辑器·iphone
TE-茶叶蛋8 小时前
JetBrains IDE(如 IntelliJ IDEA)的 Git 面板
ide·git·intellij-idea
视觉小萌新9 小时前
Ubuntu-Liunx下进行Vscode的C++编程——hello world_x64版本
ide·vscode·编辑器
挫折常伴左右9 小时前
IDEA和PYCHARM激活冲突解决
java·pycharm·intellij-idea
前端小超人rui9 小时前
Jupyter 介绍
ide·python·jupyter
珂玥c10 小时前
新增硬盘有脏数据如何处理——ubuntu16.04
linux·数据库·ide
Abbylolo10 小时前
PyCharm 中接入 Cursor AI:通过 ACP 实现无缝协作
ide·python·pycharm
GentleDevin10 小时前
IntelliJ Idea常用快捷键(Window和Mac对照表)
java·ide·intellij-idea