python 报ImportError: Install xlrd = 1.0.0 for Excel support错误
生活随笔
收集整理的這篇文章主要介紹了
python 报ImportError: Install xlrd = 1.0.0 for Excel support错误
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
前言
在使用tensorflow過程中會遇到各種各樣的問題,在此記錄一下,有助于自己回顧和后來人的學習
問題描述
在調用pandas遇到了這樣一個問題:
Traceback (most recent call last):File "D:\Anaconda\envs\dl\lib\site-packages\pandas\io\excel.py", line 391, in __init__import xlrd ModuleNotFoundError: No module named 'xlrd'During handling of the above exception, another exception occurred:Traceback (most recent call last):File "kerasbert.py", line 17, in <module>neg=pd.read_excel('../data/neg.xls',header=None,index=None)File "D:\Anaconda\envs\dl\lib\site-packages\pandas\util\_decorators.py", line 188, in wrapperreturn func(*args, **kwargs)File "D:\Anaconda\envs\dl\lib\site-packages\pandas\util\_decorators.py", line 188, in wrapperreturn func(*args, **kwargs)File "D:\Anaconda\envs\dl\lib\site-packages\pandas\io\excel.py", line 350, in read_excelio = ExcelFile(io, engine=engine)File "D:\Anaconda\envs\dl\lib\site-packages\pandas\io\excel.py", line 653, in __init__self._reader = self._engines[engine](self._io)File "D:\Anaconda\envs\dl\lib\site-packages\pandas\io\excel.py", line 393, in __init__raise ImportError(err_msg) ImportError: Install xlrd >= 1.0.0 for Excel support解決辦法
通過仔細觀察,發現是xlrd這個模塊沒有裝:
pip install xlrddone
總結
以上是生活随笔為你收集整理的python 报ImportError: Install xlrd = 1.0.0 for Excel support错误的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: springboot entity da
- 下一篇: Jupyter Notebook插入图片