本文首发于个人博客,文章链接为:https://blog.d77.xyz/archives/b256f3c6.html
通过 Dockerfile 创建镜像时,发现打包 pyecharts 库后运行报错,遂查询了一下,发现官方并没有支持这个库的打包,只能我自己动手了。
打包好的程序直接运行的话会报 FileNotFoundError:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\x\\AppData\\Local\\Temp\\_MEI6362\\pyecharts\\datasets\\map_filename.json'
查询了一下 Pyinstaller 官方并没有支持。