无法安装时间模块 [英] Can't install time module
问题描述
我试过 pip install time
和 sudo -H pip install time
,但我一直收到错误:
I've tried pip install time
and sudo -H pip install time
, but I keep getting the error:
找不到满足要求时间的版本(从版本: ) 没有找到匹配的时间分布
Could not find a version that satisfies the requirement time (from versions: ) No matching distribution found for time
我在 PyCharm 中工作,但真正没有意义的是我可以在 Python 控制台中导入时间,但不能在我的实际代码中导入时间.
I'm working in PyCharm, but what really doesn't make sense is that I can import time in the Python Console but not in my actual code.
推荐答案
time
模块 是 Python 标准库的一部分.它与 Python 的其余部分一起安装,您不需要(也不能!)使用 pip
安装它.
我可以在 Python 控制台中导入时间
I can import time in the Python Console
是的,因为它已经安装了.
Yes, because it's already installed.
但不在我的实际代码中
我不相信你.向我们展示您在尝试时收到的确切错误消息.
I don't believe you. Show us the exact error message you get when you try.
这篇关于无法安装时间模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!