找不到_strptime 的module

from datetime import datetime 后
使用datetime.strptime()显示datetime.strptime('',"%Y-%m-%d "),求解

阅读 5.3k
2 个回答

sys.path 被改写了

>>> from datetime import datetime
>>> datetime.strptime()

Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    datetime.strptime()
TypeError: strptime() takes exactly 2 arguments (0 given)

你可能自己命名了一个叫datetime.py的文件

推荐问题