cx_freeze-如何更改对lib的引用

问题描述 投票:0回答:1

使用cx_freeze构建Python应用程序。

from cx_Freeze import setup, Executable
_packages = []
_excludes = []
_include_files = [...]

buildOptions = dict(packages = _packages, enter code here`excludes = _excludes, include_files = _include_files, build_exe = '<app name>')

setup(name = '<app name>',
   version = <version>,
   description = '<description>',
   options = dict(build_exe = buildOptions),
      executables = [Executable('<app name>.py',
         targetName = '<app name>',
          icon = '<app name>.png')])

[尝试在Linux上的/ usr / bin /中使用cx_freeze安装应用程序构建,并在/ usr / share /中使用应用程序资源。

当然会导致:

Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module name 'encodings'

Current thread 0x0... (most recent call first):...

思考我需要设置/更改lib文件夹的默认位置,但是我一直无法弄清楚该怎么做。我完全有可能走在完全错误的轨道上。

我正在尝试避免使用bbfreeze。

python-3.x cx-freeze
1个回答
0
投票

查看代码后,我相信我想做的事是不可能的。 “ lib”目录在cx_freeze中进行了硬编码。

© www.soinside.com 2019 - 2024. All rights reserved.