冷冻图书馆.zip找不到文件

2024-09-30 05:20:59 发布

您现在位置:Python中文网/ 问答频道 /正文

这是我的设置.py文件:

import sys

from cx_Freeze import setup, Executable

sys.path.append(r'../lib/driver/src/')
sys.path.append(r'../lib/instrument/src/')
sys.path.append(r'../lib/routing/src/')

# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os", "pyvisa", "pyodbc", "numpy", "scipy", "skrf",],
                     "includes" : ["matplotlib.backends.backend_tkagg", 'tkinter.filedialog'],
                     "include_files": [('C:\\temp\\py34x64\\Lib\\site-packages\\scipy-0.15.0-py3.4-win-amd64.egg\\scipy\\special\\_ufuncs.pyd','_ufuncs.pyd')],
                     "zip_includes": [('C:\\Users\\user\\workspace\\routing-app\\lib\\scikit-rf\\skrf\\data\\ntwk1.s2p', 'ntwk1.s2p')]}

# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
    #base = "Win32GUI"
    base = 'Console'

setup(  name = "SomeName",
        version = "1.0",
        description = "Some Description",
        options = {"build_exe": build_exe_options},
        executables = [Executable("main.py", base=base)])

因此,我明确告诉cx_freeze将ntwk1.s2p包含到图书馆.zip文件,确实如此。在

但是,当我运行exe文件时:

^{pr2}$

那么为什么应用程序找不到里面的文件呢library.zip?感觉好像冰柜没有打开拉链图书馆.zip当实用程序.py执行模块。有什么想法吗?在


Tags: 文件pathpybuildsrcbaselibsys

热门问题