簡體   English   中英

cx_Freeze使文件具有initfsencoding問題

[英]cx_Freeze makes file with initfsencoding problem

運行我的凍結腳本將立即停止,並顯示以下消息: 1

Fatal Python error: initfsencoding: unable to load the file system codec.
ImportError: invalid flags 1530064918 in 'encodings'

Current thread 0x00000f94 (most recent call first): 

我使用Python 3.7.0和cx_Freeze 5.1.1(64位)。

我的劇本:

import os
from cx_Freeze import setup, Executable

PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))
os.environ['TCL_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tcl8.6')
os.environ['TK_LIBRARY'] = os.path.join(PYTHON_INSTALL_DIR, 'tcl', 'tk8.6')

build_exe_options={
            'packages':['copy', 'tkinter', 'os', 'pandas',
                'numpy', 'scipy', 'csv', 'datetime', 'matplotlib']

executables=[Executable("Data_GUI_11.py")]

setup(name='Data_GUI_11',
    version=0.1,
    description='Data reader and plotter',
    options={"build_exe": build_exe_options},
    executables=executables
    )

可能會有更多錯誤–這是我第一次嘗試使用cx_Freeze。 沒有線索…

謝謝。

嘗試在python 3.6或python 3.5之類的早期版本中進行編碼.python 3.7中的cx_Freeze有問題。我已經追溯到python 3.6了,現在還沒有這些問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM