您的位置:首页 > 其它

pyinstaller打包plotly后无法正常运行的问题

2020-04-24 11:02 423 查看

pyinstaller打包plotly后无法正常运行的问题

在使用pyinstaller打包带有plotly的程序后,在运行程序时会出现如下反馈

"c:\users*\appdata\local\continuum\anaconda3\envs\py34\lib\site-p ackages\PyInstaller\loader\pyimod03_importers.py", line 474, in get_data
with open(path, 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory:
'H:\Python\Commodity_M AI_Trade_List\Code\dist\comdty_runtime\plotly\package_data\default-schema. json'
Failed to execute script comdty_runtime

这是由于pyinstaller现在还无法兼容plotly的原因所造成的,解决方法如下:
1.在打包时不要选择使用-F打包成单个文件
2.在打包完后,从anaconda目录下复制plotly文件夹(作者的位置是E:Anaconda3\Lib\site-packages\plotly)到打包完成的文件夹中(作者的位置是D:\Anaconda Library\XXXX项目\dist{exe名字文件夹}\)。

复制完成后,就可以顺利使用exe文件啦~

  • 点赞 1
  • 收藏
  • 分享
  • 文章举报
大饼不会飞 发布了3 篇原创文章 · 获赞 3 · 访问量 6万+ 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐