执行cx_freeze文件时导入ImportError

时间:2017-04-18 04:55:56

标签: python tkinter cx-freeze

我使用tkinter构建了一个GUI工具,然后使用cx_Freeze尝试将该工具转换为未安装python的Windows用户的.exe。双击cx_Freeze创建的.exe文件后,我收到以下错误。有什么建议吗?

import sys
import os
from cx_Freeze import setup, Executable

os.environ['TCL_LIBRARY'] = r'C:\Python35\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Python35\tcl\tk8.6'


setup(
    name = "FWMon Creator",
    version = "1.0",
    author = "xxx xxxx",
    description = "A tool to help create a FWMon command.",
    executables = [Executable("tcptest.py")])

使用以下命令创建setup.py文件(python 3.5):

\\[ \frac{1}{n^{2}} \\]

\\[ J(\theta) = \frac{1}{2m}[\sum_{i=1}^m(h_\theta (x^{(i)}) - y^{(i)})^2 + \lambda\sum_{j=1}^n\theta^2_j] \\]

0 个答案:

没有答案