我从 here 下载了 cx_Freeze , 按照 this thread 在 Ubuntu 上成功安装它.
在 cx_Freeze/samples/simple 中运行 python3 setup.py build 后,将目录更改为 cx_Freeze/samples/simple/build/exe.linux -i686-3.4,运行以下命令,出现错误
➜ exe.linux-i686-3.4 ./hello
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ImportError: No module named 'encodings'
[1] 3950 abort ./hello
➜ exe.linux-i686-3.4
有解决此问题的想法吗?
请您参考如下方法:
正如 Thomas K 所说,官方的 cx_Freeze 5 构建在基于 Debian 的系统上存在问题。如果你真的需要使用 v5,你可以下载我的补丁二进制文件,直到问题在上游得到解决:https://github.com/peacegiverman/cx_Freeze-deb-wheels .
