OS: Windows 10
我有一个非常简单的 python 脚本datetime.py:
import datetime
print(datetime.datetime.now())
input("press enter to continue")
从控制台运行:python datetime.py
输出:
Traceback (most recent call last):
File "datetime.py", line 1, in <module>
import datetime
File "C:\Users\DAN024\Documents\Python\datetime.py", line 7, in <module>
print(datetime.datetime.now())
AttributeError: partially initialized module 'datetime' has no attribute 'now' (most likely due to a circular import)
湖上湖
相关分类