当我输入简单的代码时:
import datetime
datetime.utcnow()
,我收到错误消息:
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
datetime.utcnow()
AttributeError: 'module' object has no attribute 'utcnow'
但是python的文档utcnow
就在这里:https ://docs.python.org/library/datetime.html#datetime.datetime.utcnow 。为什么utcnow
不能在我的电脑上工作?谢谢!