在Ubuntu中使用pyinstaller,错误:没有名为msvc的模块

时间:2017-05-09 19:50:25

标签: pyinstaller

我想在Ubuntu 16.04下打包一个python文件。 我输入了这个命令

pyinstaller -D -F -n main  "run_file.py"

但是,它在处理过程中显示错误:

  

3377 INFO:处理预安全导入模块挂钩win32com   Traceback(最近一次调用最后一次):     文件“”,第2行,in   ImportError:没有名为win32com的模块

它是经久耐用的。我在ubuntu中使用pyinstaller,那为什么它需要win32com? 当我运行打包的可执行文件 它显示错误:

  

import_module中的文件“importlib / init .py”,第37行   ImportError:没有名为msvc的模块

有什么想法吗?

1 个答案:

答案 0 :(得分:1)

您可以使用--hidden-import=setuptools.msvc参数来调用python pyinstaller或填充Analysis对象中的hiddenimports=['setuptools.msvc'],如@rafa建议的那样。

相关问题