虚拟环境安装包:
打包出来报错
报错如下:
Traceback (most recent call last):
File "qufen.py", line 63, in <module>
File "qufen.py", line 22, in open_file
File "pandas\util\_decorators.py", line 296, in wrapper
File "pandas\io\excel\_base.py", line 304, in read_excel
File "pandas\io\excel\_base.py", line 867, in __init__
File "pandas\io\excel\_xlrd.py", line 21, in __init__
File "pandas\compat\_optional.py", line 110, in import_optional_dependency
ImportError: Missing optional dependency 'xlrd'. Install xlrd >= 1.0.0 for Excel support Use pip or conda to install xlrd.
[17344] Failed to execute script 'qufen' due to unhandled exception!
应该是打包了之后在正常环境运行的时候没有xlrd,但是你虚拟环境配置了。打包的时候也不可能把xlrd打包进去啊。。。你在虚拟里面运行,因为有xlrd1.2,所以没事。但是你不在虚拟里面运行的时候,就没有xlrd了