gpt4 book ai didi

python - 导入错误 : cannot import name 'registry' from 'pandas.core.dtypes.base'

转载 作者:行者123 更新时间:2023-12-04 17:26:08 25 4
gpt4 key购买 nike

我只是按照教程安装了几个包,现在我什至无法导入 pandas。

我安装了这些:

fake-factory==0.7.2
Faker==0.7.3
pytz==2016.7
tzlocal==1.3.0

现在我明白了:

>>> import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\ProgramData\Anaconda3\envs\ariel\lib\site-packages\pandas\__init__.py", line 42, in <module>
from pandas.core.api import *
File "C:\ProgramData\Anaconda3\envs\ariel\lib\site-packages\pandas\core\api.py", line 7, in <module>
from pandas.core.arrays.integer import (
File "C:\ProgramData\Anaconda3\envs\ariel\lib\site-packages\pandas\core\arrays\__init__.py", line 2, in <module>
from .base import (ExtensionArray, # noqa
File "C:\ProgramData\Anaconda3\envs\ariel\lib\site-packages\pandas\core\arrays\base.py", line 21, in <module>
from pandas.core import ops
File "C:\ProgramData\Anaconda3\envs\ariel\lib\site-packages\pandas\core\ops\__init__.py", line 21, in <module>
from pandas.core.construction import extract_array
File "C:\ProgramData\Anaconda3\envs\ariel\lib\site-packages\pandas\core\construction.py", line 18, in <module>
from pandas.core.dtypes.base import ExtensionDtype, registry
ImportError: cannot import name 'registry' from 'pandas.core.dtypes.base' (C:\ProgramData\Anaconda3\envs\ariel\lib\site-packages\pandas\core\dtypes\base.py)

我尝试执行 conda update pandas,但无济于事。

我也刚刚安装了 luigi,不太确定它什么时候坏了,因为我一次性安装了所有额外的包。

最佳答案

更新版本的 pandas 包使用 pip3python3

中试试这个
pip3 install --upgrade pandas

关于python - 导入错误 : cannot import name 'registry' from 'pandas.core.dtypes.base' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63292709/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com