2017-10-29 9 views
0

이미지 처리를 위해 python을 사용하여 EXE를 작성합니다. tkinter, cx_Freeze를 사용하여 응용 프로그램을 빌드하고 있습니다.build/exe.win-amd64-3.6/scipy/misc/pilutil.py; 가져 오기 이미지; moduleNotFoundError : Image라는 모듈이 없습니다.

from cx_Freeze import setup, Executable 
import sys 
import matplotlib 
from PIL import Image 

import numpy.core._methods 
import numpy.lib.format 

import os.path 


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') 

base =None 

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



executables=[ 
     Executable("application.py",base=base) 
     ] 
options = { 
    'build_exe': { 
     'include_files':[ 
      os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'), 
      os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'), 
      os.path.join(r'C:\Users\rahul\Anaconda3\Lib\site-packages\scipy'), 
     ], 
     'includes': ['numpy.core._methods', 'numpy.lib.format','numpy.matlib', 
        'multiprocessing.process','matplotlib.backends.backend_tkagg', 
        'matplotlib.backends.backend_qt5agg','PIL.Image', 
        ], 
    }, 
} 

setup(
    name = "XXXXXXXXXXXX", 
    options = options, 
    version = "1.00", 
    description ="XXXXXXXXXXXXXXXXXXXXXXXXXX", 
    executables = executables 
    ) 

답변

0
pip install Image 

내 문제를 해결 :

나는 오류 아래

enter image description here

얻고 것은 setup.py 파일입니다.