Tom*_*ier 7 python linux cx-freeze python-2.7
我正在尝试使用cx_Freeze将Python中的hello world程序编译成Linux上的独立二进制/包.当cx_Freeze运行时,它完成没有错误但是当我尝试运行生成的可执行文件时,我收到错误:
ImportError: No module named __startup__
Run Code Online (Sandbox Code Playgroud)
我的setup.py文件是:
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(packages = [], excludes = [])
base = 'Console'
executables = [
Executable('test.py', base=base)
]
setup(name='test',
version = '1.0',
description = '',
options = dict(build_exe = buildOptions),
executables = executables)
Run Code Online (Sandbox Code Playgroud)
它运行如下:
python setup.py build
Run Code Online (Sandbox Code Playgroud)
我很困惑为什么会这样.如果ImportError是一个库,我会理解 - 但__startup__我不熟悉.
谢谢.
| 归档时间: |
|
| 查看次数: |
2241 次 |
| 最近记录: |