部分初始化的模块“ datetime”没有属性“ now”

时间:2020-09-14 07:32:19

标签: pandas date python-import

import pandas as pd
data = pd.read_excel(r,'C:\python Projects\python\Book1.xlsx')
print(data)

//错误

C:\python Projects\python>python sir.py
Traceback (most recent call last):
  File "sir.py", line 1, in <module>
    import pandas as pd
  File "C:\Users\Rajan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pandas\__init__.py", line 11, in <module>
    __import__(dependency)
  File "C:\Users\Rajan\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pytz\__init__.py", line 12, in <module>
    import datetime
  File "C:\python Projects\python\datetime.py", line 3, in <module>
    filename=datetime.datetime.now()
AttributeError: partially initialized module 'datetime' has no attribute 'now' (most likely due to a circular import)

0 个答案:

没有答案