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

结束!!!

相关推荐
2501_9159090613 小时前
Windows 打开 Xcode 工程,编译调试 Xcode 项目并和 Mac 同事协作
ide·windows·vscode·macos·ios·个人开发·xcode
golang学习记13 小时前
比VS Code轻10倍,JetBrains开源全新AI IDE
ide·人工智能·jetbrains·thinkrail
我要见SA姐12 天前
Chrome 内存泄漏诊断指南:从现象定位到根因排查
ide·vscode·python·自动化·编辑器
00后程序员张2 天前
Windows 开发 iOS App 入门,用 SwiftUI 写第一个 iOS App 装到 iPhone
ide·vscode·ios·objective-c·个人开发·swift·敏捷流程
瓶 盖2 天前
你的 IDE 插件改了 authorized_keys:Claude Code 扩展投毒链路拆解
ide·ssh·vs code·安全分析·供应链安全·claude code
golang学习记3 天前
IDEA 断点调试技巧:拖拽
java·ide·intellij-idea
Halo10133 天前
VSCode设置护眼背景色
ide·vscode·编辑器
fanruitian3 天前
pycharm 使用anaconda
ide·python·pycharm
weixin_563371473 天前
Android Studio 2024 版 Device Explorer 打开方法
android·ide·android studio
咸咸咸虾3 天前
Microsoft Visual Studio 历史版本与官方安装包链接汇总
ide·microsoft·visual studio