【问题标题】:How to install the os module on Windows? [duplicate]如何在 Windows 上安装 os 模块? [复制]
【发布时间】:2017-12-29 00:18:05
【问题描述】:

我正在尝试在 Windows 上安装 os python 模块。

cmd 控制台中,我输入了:

C:\Users\username> pip install os Collecting os Could not find a version that satisfies the requirement os (from versions: ) No matching distribution found for os

所以我猜测由于某些原因该模块在 Windows 上不可用,但我在一些 SO 问题中找到了它的引用。

显然,在 Google 中输入 Windowsos 只会给我关于 Windows 本身的答案。

那么,如何在 Windows 上安装 os 模块?

【问题讨论】:

  • 你为什么要安装它? os 是标准库的一部分,所以如果你有 Python,你已经有 osdocs.python.org/2/library/os.html
  • os 是标准的 Python 模块,无需安装。
  • @MattBall emacs jedi 需要它,但没有找到它在控制台中时,os 函数返回 no module named os
  • 这听起来像是the XY problem 的一个例子。我建议您在 emacs jedi 的上下文中发布另一个问题,其中包含您所看到的特定错误的详细信息。

标签: python


【解决方案1】:

OS 是 python 的标准库。所以不用下载了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-05-03
    • 1970-01-01
    • 1970-01-01
    • 2012-07-22
    • 2011-05-17
    • 2011-01-23
    • 1970-01-01
    相关资源
    最近更新 更多