Is pickle file of python cross-platform?

前端 未结 6 1784
攒了一身酷
攒了一身酷 2020-11-28 12:54

I have created a small python script of mine. I saved the pickle file on Linux and then used it on windows and then again used it back on Linux but now that file is not work

6条回答
  •  爱一瞬间的悲伤
    2020-11-28 13:26

    The pickle module supports several different data formats. If you are specifying a particular pickle format instead of using the default (0), you may be running into cross-platform binary file problems. You can use plain ASCII pickle files by specifying protocol 0.

提交回复
热议问题