趁端午准备提交二进制程序的事情,想来python下要打包应该较容易,主要是看mxnet能打包进去不。
pyinstaller挺不错的。
写个test.py看看能不能run:

import mxnet as mx
import numpy as np
import cv2
import os, sys
import matplotlib.pyplot as plt

ModPrefix = '../../output/May-26/Fri May 26 11:31:13 2017'
epoch = 6

mod = mx.mod.Module.load(ModPrefix,epoch)
print 'just have a test'
print mod
pyinstaller test.py

生成的执行文件在dist/里面去找,build/里面是假象...

# 在 dist/test/ 下
./test
#报错

原因是关于xmnet的,将MXNETHOME/lib/下的libmxnet.so复制到二进制文件目录下,可以work:

$ ./test
just have a test
<mxnet.module.module.Module object at 0x9755f8c>
$ 

ok!

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-13
  • 2021-10-15
  • 2022-12-23
  • 2021-10-29
  • 2022-01-11
  • 2021-06-18
  • 2021-08-23
相关资源
相似解决方案