pyinstaller:将python文件编译为onefile

时间:2015-05-31 20:50:21

标签: python-2.7 pyinstaller

我正在尝试使用Pyinstaller

在Linux上编译我的项目

当我尝试编译简单项目时,它正在100%工作

但是当我正在尝试编译我的项目并且它有很多代码时它是正确的编译但是当我试图运行它时返回错误

说:

root@vps5838:/home/darksoul/pyinstaller/dist# ./test
Traceback (most recent call last):
  File "<string>", line 11, in <module>
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/darksoul/pyinstaller/build/module/out00-PYZ.pyz/pkg_resources", line 21, in <module>
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/loader/pyi_importers.py", line 270, in load_module
    exec(bytecode, module.__dict__)
  File "/home/darksoul/pyinstaller/build/module/out00-PYZ.pyz/io", line 51, in <module>
  File "/usr/local/lib/python2.7/site-packages/PyInstaller/loader/pyi_importers.py", line 409, in load_module
    module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
ImportError: /tmp/_MEI8vYOKA/_io.so: undefined symbol: _PyLong_AsInt

我在做的是:

pyinstaller --onefile test.py

我的操作系统是:Linux(Ubuntu)

我该怎么办?

0 个答案:

没有答案