【问题标题】:Pip Install Not working with Scikit-LearnPip 安装不适用于 Scikit-Learn
【发布时间】:2012-12-31 07:32:27
【问题描述】:

当我尝试在 Python shell 上输入 pip install scikit-learn 时,我收到“无效语法”消息。我已经 安装了 Scipy 和 Numpy,所以不应该有任何依赖问题。怎么了? 而且我还是 Python 新手,所以我不想手动安装该模块。我正在使用 Python 2.7 Vista 32 位。

感谢您的帮助。

【问题讨论】:

  • 是的,我重新阅读了您的问题。据我了解,您正在尝试从 python shell 执行 pip install 命令。这不是它的工作方式。 :) 你必须从命令行运行它。看看这个 -> stackoverflow.com/questions/4750806/…

标签: python scikit-learn


【解决方案1】:

如果您使用 Windows 可执行文件(.exe 文件)安装了所有内容,您还应该将其安装为可在此处下载的可执行文件 - Scikit Learn Executables

或者,

python shell 不是运行pip 命令的地方。所以在windows中打开命令行终端并执行pip install -U scikit-learn

然后进入python shell并导入。

【讨论】:

    猜你喜欢
    • 2021-02-13
    • 2021-08-23
    • 2017-03-08
    • 2015-06-15
    • 1970-01-01
    • 2018-12-21
    • 2022-01-17
    • 2014-06-05
    • 2014-06-27
    相关资源
    最近更新 更多