pyinstaller打包torch运行后报错
这个实际上网上很多类似的,但不太相同,得观察报错信息是否一致。如果报错的最后面有torchvision,则应该是版本问题,进行版本修改估计就ok了,但如果是类似下面这种的,可以参考这一篇。
OSError: Can’t get source for <function c2p_dynamic_expand at 0x000001D6187E98B8>. TorchScript requires source access in order to carry out compilation, make sure original .py files are a
pyinstaller打包torch出现OSError: could not get source code、pkg_resources.DistributionNotFound
亲测有效,做一下记录。