本文介绍了大苏尔+最新版Spyder上的2019 Macbook Pro上的 pandas 输入错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将我的2019 Macbook Pro 15英寸更新为Big Sur。我发现Spyder+Anaconda有很大的滞后,Spyder开发人员建议直接下载Spyder.dmg并通过那里使用Python。
但是,每次我尝试使用Pandas(我有多个依赖于该包的脚本)时,我都会收到这样的错误:
runcell(0, '/Users/insertname/Documents/projectpath')
Traceback (most recent call last):
File "<frozen zipimport>", line 259, in load_module
File "pandas/_libs/tslibs/conversion.pyc", line 14, in <module>
File "pandas/_libs/tslibs/conversion.pyc", line 10, in __load
File "imp.pyc", line 342, in load_dynamic
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1116, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "pandas/_libs/tslibs/conversion.pyx", line 1, in init pandas._libs.tslibs.conversion
ModuleNotFoundError: No module named 'pandas._libs.tslibs.base'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen zipimport>", line 259, in load_module
File "pandas/_libs/missing.pyc", line 14, in <module>
File "pandas/_libs/missing.pyc", line 10, in __load
File "imp.pyc", line 342, in load_dynamic
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1116, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "pandas/_libs/missing.pyx", line 1, in init pandas._libs.missing
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "pandas/_libs/tslibs/__init__.pyc", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 261, in load_module
KeyError: 'pandas._libs.tslibs.conversion'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen zipimport>", line 259, in load_module
File "pandas/_libs/hashtable.pyc", line 14, in <module>
File "pandas/_libs/hashtable.pyc", line 10, in __load
File "imp.pyc", line 342, in load_dynamic
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1116, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "pandas/_libs/hashtable.pyx", line 1, in init pandas._libs.hashtable
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 261, in load_module
KeyError: 'pandas._libs.missing'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen zipimport>", line 259, in load_module
File "pandas/_libs/interval.pyc", line 14, in <module>
File "pandas/_libs/interval.pyc", line 10, in __load
File "imp.pyc", line 342, in load_dynamic
File "<frozen importlib._bootstrap>", line 711, in _load
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 1116, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 261, in load_module
KeyError: 'pandas._libs.hashtable'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/insertname/Documents/projectpath", line 12, in <module>
import pandas
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "pandas/__init__.pyc", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 259, in load_module
File "pandas/_libs/__init__.pyc", line 13, in <module>
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
File "<frozen zipimport>", line 261, in load_module
KeyError: 'pandas._libs.interval'
目前,我只是在脚本中调用import pandas
进行测试。我已经完全从我的计算机上清除了蟒蛇,并使用了brew install
的最新版本的Python(3.9.2)和最新的Spyder版本(4.2.1)。
Spyder在框架的底部显示它运行的是python3.9.1--尽管我不知道这是否与此有关。我尝试了pip3
卸载Pandas并多次重新安装,清除了我计算机上的Spyder&;python(虽然我相信不是每个Mac都附带的,2.7)--但没有什么能让我通过上面的错误。
我不想回到Anaconda(至少,在滞后消失之前)。我已经尝试了this问题中的所有方法--但我不想走蟒蛇的路。
推荐答案
我花了整整两天的时间试图找到答案。我们开始了-
我不知道为什么花了一整天的时间,python解释器才最终接受输入(我不得不重新指向这个python包,using the second answer on this guide)。
然后,控制台显示与Spyder IDE底部不同的版本(3.9.1对3.9.2)。
然后我不得不使用pip3 install spyder-kernels
-然后轰。可以走了。已修复 pandas 错误。
这篇关于大苏尔+最新版Spyder上的2019 Macbook Pro上的 pandas 输入错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!