gpt4 book ai didi

python - Pandas 导入错误 : module 'bottleneck' has no attribute '__version__'

转载 作者:行者123 更新时间:2023-11-28 21:37:46 27 4
gpt4 key购买 nike

我已经使用 pandas、tensorflow 几个月了,但是今天突然我无法导入它们。
当我尝试:

import pandas as pd

它将显示:
File "<input>", line 1, in <module>
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\pandas\__init__.py", line 42, in <module>
from pandas.core.api import *
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\pandas\core\api.py", line 9, in <module>
from pandas.core.categorical import Categorical
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\pandas\core\categorical.py", line 36, in <module>
from pandas.core.base import (PandasObject,
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\pandas\core\base.py", line 20, in <module>
import pandas.core.nanops as nanops
File "C:\Program Files\JetBrains\PyCharm Community Edition 2017.2.4\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\User\AppData\Local\Programs\Python\Python36\lib\site-packages\pandas\core\nanops.py", line 30, in <module>
ver = bn.__version__
AttributeError: module 'bottleneck' has no attribute '__version__'

我可以知道我能做什么吗?我已经安装了瓶颈,但似乎仍然出现错误。

最佳答案

我遇到了同样的问题。
我真的不知道这意味着什么,但似乎模块“瓶颈”中一定有问题。
然后我通过以下方式解决了它:

conda remove bottleneck

conda install bottleneck


是的,只需重新安装瓶颈,我的问题就解决了。
希望这可以帮助你。

关于python - Pandas 导入错误 : module 'bottleneck' has no attribute '__version__' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48969627/

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