【问题标题】:Python module installation failing [duplicate]Python 模块安装失败
【发布时间】:2022-12-03 01:23:03
【问题描述】:

我的 python 不会安装时间模块,它要求我将我的 pip 更新到最新版本,我做到了。 我收到此错误:

ERROR: Could not find a version that satisfies the requirement time (from versions: none) ERROR: No matching distribution found for time

我的python版本是最新的。蟒蛇 3.11.0 点子版本:22.3.1

都到此为止了。。 任何ideias为什么?

尝试通过 CMD 和 pycharm 包添加安装。 还更新了 python 和 pip。没有成功。

【问题讨论】:

  • 看起来您正在尝试安装 time 模块,它是 Python 中的内置模块。您不需要使用 pip 安装它。您应该能够通过像import time 一样简单地导入它来在您的代码中使用它
  • 这回答了你的问题了吗? Can't install time module

标签: python time module pip python-idle


【解决方案1】:

时间模块是 Python 标准库的一部分。它与 Python 的其余部分一起安装,您不需要(您也不能!)使用 pip 安装它。

I can import time in the Python Console

是的,因为它已经安装好了。

but not in my actual code

我不相信你。向我们展示您尝试时收到的确切错误消息。

【讨论】:

    猜你喜欢
    • 2020-06-19
    • 1970-01-01
    • 2018-06-19
    • 2013-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-14
    • 2014-05-08
    相关资源
    最近更新 更多