C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\Scripts\python.exe C:\Users\26921\PycharmProjects\pythonProject\six.py Traceback (most recent call last): File "C:\Users\26921\PycharmProjects\pythonProject\six.py", line 3, in <module> import pandas as pd File "C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\lib\site-packages\pandas\__init__.py", line 22, in <module> from pandas.compat import is_numpy_dev as _is_numpy_dev # pyright: ignore # noqa:F401 File "C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\lib\site-packages\pandas\compat\__init__.py", line 25, in <module> from pandas.compat.numpy import ( File "C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\lib\site-packages\pandas\compat\numpy\__init__.py", line 4, in <module> from pandas.util.version import Version File "C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\lib\site-packages\pandas\util\__init__.py", line 2, in <module> from pandas.util._decorators import ( # noqa:F401 File "C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\lib\site-packages\pandas\util\_decorators.py", line 14, in <module> from pandas._libs.properties import cache_readonly File "C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\lib\site-packages\pandas\_libs\__init__.py", line 13, in <module> from pandas._libs.interval import Interval File "pandas\_libs\interval.pyx", line 1, in init pandas._libs.interval File "pandas\_libs\hashtable.pyx", line 1, in init pandas._libs.hashtable File "pandas\_libs\missing.pyx", line 1, in init pandas._libs.missing File "C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\lib\site-packages\pandas\_libs\tslibs\__init__.py", line 39, in <module> from pandas._libs.tslibs.conversion import localize_pydatetime File "pandas\_libs\tslibs\conversion.pyx", line 1, in init pandas._libs.tslibs.conversion File "pandas\_libs\tslibs\offsets.pyx", line 1, in init pandas._libs.tslibs.offsets File "pandas\_libs\tslibs\timestamps.pyx", line 1, in init pandas._libs.tslibs.timestamps File "pandas\_libs\tslibs\timedeltas.pyx", line 1, in init pandas._libs.tslibs.timedeltas File "pandas\_libs\tslibs\timezones.pyx", line 24, in init pandas._libs.tslibs.timezones File "C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\lib\site-packages\dateutil\tz\__init__.py", line 2, in <module> from .tz import * File "C:\Users\26921\PycharmProjects\pythonProject\jsonxinhuanjing\lib\site-packages\dateutil\tz\tz.py", line 19, in <module> import six File "C:\Users\26921\PycharmProjects\pythonProject\six.py", line 30, in <module> df = pd.read_excel('/Users/26921/Desktop/shuju/10000-20000.xlsx') AttributeError: partially initialized module 'pandas' has no attribute 'read_excel' (most likely due to a circular import) Process finished with exit code 1
时间: 2023-07-12 17:58:13 浏览: 291
打包exe文件过大.txt
这是一个Python的报错信息,看起来是因为在你的代码中出现了循环导入(circular import)的问题导致的。具体来说,pandas模块和six模块之间出现了循环导入的问题,导致pandas模块没有正确地导入read_excel函数。建议你检查一下你的代码,看看是否有导入模块的顺序出现了问题,或者是否有不必要的循环导入。
阅读全文