簡體   English   中英

運行cx_freeze創建的exe時出現錯誤

[英]Getting error while running exe created by cx_freeze

我已經將Python腳本轉換為exe文件,它在我的計算機上運行良好,我將其安裝在沒有Python的另一台計算機上。 我在運行exe時收到此錯誤消息。

File "C:\ProgramData\Anaconda3\lib\site-packages\cx_Freeze\initscripts\__start
up__.py", line 12, in <module>
  File "C:\ProgramData\Anaconda3\lib\site-packages\cx_Freeze\initscripts\Console
.py", line 24, in <module>
  File "Text.py", line 9, in <module>
  File "C:\ProgramData\Anaconda3\lib\site-packages\pandas\__init__.py", line 18,
 in <module>
ImportError: Missing required dependencies ['numpy']

setup.py:

import sys,os
from cx_Freeze import setup, Executable
import matplotlib

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

build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]}

setup( name = "Text Analyzer" , version = "0.1" , description = "Test Case Analyzer" , executables = [Executable("Text.py"),Executable("Text_Get.py")]  )

該計算機沒有Python,因此為什么要引用C:\\ProgramData\\Anaconda3路徑。

請幫忙。

由於panda中的init .py檢查硬依賴性,因此會引發錯誤。 修復此在軟件包列表中添加numpy的問題。 build_exe_options = {“ packages”:[“ os”,“ numpy”],“ excludes”:[“ tkinter”]}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM