2017-12-10 7 views
1

나는 다음과 같은 오류 얻을 exe.win32-3.6 폴더의 .exe 파일을 실행하려고 할 때 .EXE 로 평 파일을 변환하려고 :나 cx_Freeze ModuleNotFoundError : 이름 없음 모듈 없다 '코덱'

C:\Users\Aktan\Desktop\build\exe.win32-3.6>StatisticsCalculator.exe 
Fatal Python error: Py_Initialize: unable to load the file system codec 
Traceback (most recent call last): 
    File "C:\Users\Aktan\AppData\Local\Programs\Python\Python36-32\lib\encodings\__init__.py", line 31, in <module> 
ModuleNotFoundError: No module named 'codecs' 
을 여기

내 setup.py 코드 :

import cx_Freeze 
import sys 
import os 
import matplotlib 

os.environ['TCL_LIBRARY'] = "C:\\LOCAL_TO_PYTHON\\Python35-32\\tcl\\tcl8.6" 
os.environ['TK_LIBRARY'] = "C:\\LOCAL_TO_PYTHON\\Python35-32\\tcl\\tcl8.6" 

base = None 

if sys.platform == 'win32': 
    base='Win32GUI' 

executables = [cx_Freeze.Executable("StatisticsCalculator.py", base=None)] 

cx_Freeze.setup(
    name="This is a tes", 
    options = {"build_exe": {"packages":["numpy"]}}, 
    version = "0.01", 
    description = "Trying to get this to work", 
    executables = executables 
    ) 

하고 도움이된다면 모르겠지만, 여기에 내가 내 파이썬 프로그램에서 사용하는 모듈입니다 :

import sqlite3 
from math import pow, sqrt 
from tkinter import Tk, Label, Listbox, END, Button, Message, messagebox 
import matplotlib.pyplot as plt 

파이썬 3.6.3을 가지고 있고 윈도우 10을 돌리고 있습니다. 어떤 응답도받을 수있을 것입니다.

+0

질문하기 https://stackoverflow.com/questions/42961944/cx-freeze-no-module-named-codecs – Simon

+0

가능한 [cx \ _Freeze : "모듈 이름이없는 코덱]"(https :// /images/42961944/cx-freeze-no-module-named-codecs) – Simon

+0

@Simon하지만 그 사람은 우분투를 실행 중이며 답변 중 하나는 우분투가 파이썬을 수정했다고 말합니다. – Aktan

답변

1

이것은 소스에서 해결 된 cx_Freeze의 알려진 문제점입니다. 곧 새로운 문제 (5.1.1)가 해결 될 것입니다!

+0

그래도 그게 슬픈 일이긴하지만, 이제는 그것에 대해 연구하는 것을 멈출 수 있습니다. 감사합니다! – Aktan

+0

새 버전이 출시 될 때 어떤 생각이 있으십니까? – Celso

+1

예! 몇 분 전! :-) –