制作tkinter GUI并转换exefile。 所以使用了cx_freeze并设置了代码
import cx_Freeze import sys import pandas as pd import pickle from sklearn import preprocessing import numpy as np
base = None
if sys.platform == 'win32':
base = "Win32GUI"
executables = [cx_Freeze.Executable("150921_cdGUI_tkint.py", base=base, )]
cx_Freeze.setup(
name = "150921_cdGUI_tkint",
option = {"build_exe": {"packages":
["tkinter","sklearn","pandas","numpy","pickle"]}},
version = "0.1",
description = "150921_cdGUI_tkint",
executables = executables)
并运行exe文件此错误消息
Traceback(most recent call last):
...
ImportError: No module named 'scipy.__config__'
...
raise ImportError(msg)
ImportError: Error importing scipy: you cannot import scipy while being in scipy source directory; Please exit the scipy source tree first, and relaunch your python interpreter
在GUI代码中,从sklearn导入预处理中输入“ 这行删除了,并且exe文件没有错误....... ;;; 我不知道该怎么办... AQAP帮助
"use version"
Anaconda(spyder python3.4 65bit)
cx_Freeze-4.3.4
pandas 0.16.2
numpy 1.9.3
scipy-0.16.0
scikit_learn-0.16.1
sklearn