ImportError: Loader FrozenImporter cannot handle module inspect ||python ide中正常运行,用pyinsta打包为exe文件报错

1 报错图片

ImportError: Loader FrozenImporter cannot handle module inspect ||python ide中正常运行,用pyinsta打包为exe文件报错_第1张图片

2 报错信息

zlib.error: Error -3 while decompressing data: incorrect header checkThe above exception was the direct cause of the following exception:
ImportError: Loader FrozenImporter cannot handle module inspect
[13724] Failed to execute script 'pyi_rth_inspect’due to unhandled exception!

3 报错来源

在pycharm中可以正常运行,当我使用pyinstaller打包为exe文件进行运行时,产生了如上报错。

4 报错原因

python代码中使用了如下方法:
os.path.isfile(path=path)

5 解决办法

删除或者替换上面方法

你可能感兴趣的:(python,pycharm,ide,python)