2017-11-16 5 views
1

모듈을 .py에서 .pyd로 변환해야했습니다. 나는 Cython으로 해냈다. 프로젝트가 끝나고 테스트를했는데 모든 것이 잘 작동했습니다. cx_Freeze를 사용하여 빌드를 만들었을 때 .pyd 모듈에서 문제가 발생했습니다. 나는 왜 내가 이것을 구축했는지 이해할 수 없다. ModuleNotFoundError..pyd 파일의 ModuleNotFoundError 오류

File "tooth_comp.pyx", line 13, in int 
src.graphics_dental_components.tooth_comp 
ModuleNotFoundError: No module named 'graphics_utils.effects' 

내 설치 스크립트 : 응용 프로그램이 확장자를 찾을 수 없기 때문에 오류 메시지에 대한

import sys 
from cx_Freeze import setup, Executable 

packages = [] 
excludes = [] 
include_files = ["assets", "views"] 

build_exe_options = {"packages": packages, "excludes": excludes, "include_files": include_files} 

base = None 
if sys.platform == "win32": 
    base = "Win32GUI" 

setup( name = "MyApp", 
     version = "0.1", 
     description = "My GUI application!", 
     options = {"build_exe": build_exe_options}, 
     executables = [Executable("app.py", base=base)]) 

답변

1

이유입니다.

graphics_utils.effectspackages 목록에 추가 한 다음 다시 컴파일 해보십시오.

그래도 작동하지 않으면 수동으로 빌드 폴더의 모듈을 복사 할 수 있습니다.

+0

완벽하게 작동합니다. 고마워요! –

+1

@EugeniuZnagovan 매우 기뻤습니다. Cx_Freeze는 사용할 통증이지만'include_files' 또는'packages'에 누락 된 것을 추가하는 것은 일반적으로 트릭입니다. :) – Simon