报错信息:
RuntimeError: The current Numpy installation ('C:\\soft\\Python\\Python38\\lib\\site-packages\\numpy\\__init__.py')
fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86
详细信息:
进行降级操作:
C:\>pip list | findstr "numpy"
C:\>pip uninstall numpy
Found existing installation: numpy 1.19.4
Uninstalling numpy-1.19.4:
Would remove:
c:\soft\python\python38\lib\site-packages\numpy-1.19.4.dist-info\*
c:\soft\python\python38\lib\site-packages\numpy\*
c:\soft\python\python38\scripts\f2py.exe
Proceed (y/n)? y
Successfully uninstalled numpy-1.19.4
C:\>pip install numpy==1.19.3 -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com/pypi
报错信息:
xlrd.biffh.XLRDError: Excel xlsx file; not supported
C:\>pip install xlrd
Collecting xlrd
Downloading xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
|████████████████████████████████| 96 kB 288 kB/s
Installing collected packages: xlrd
Successfully installed xlrd-2.0.1
由于默认安装的新版本不支持xlsx格式
需要使用降级的版本或者
XlsxWriter 或者使用 openpyxl
C:\>pip install xlrd==1.2.0
大于此版本的不支持xlsx
Extract data from Excel spreadsheets (.xls and .xlsx, versions 2.0 onwards) on any platform. Pure Python (2.7, 3.4+).
Strong support for Excel dates. Unicode-aware.