gpt4 book ai didi

python - py安装程序 "unable to find a txt file when adding a binary"

转载 作者:行者123 更新时间:2023-12-05 07:00:52 30 4
gpt4 key购买 nike

当我使用 pyinstaller 将我的脚本转换为 exe 时,出现错误:-

Unable to find "c:\users\praveen\appdata\local\programs\python\python36\lib\site-packages\importlib_resources\version.txt" when adding binary and data files

您可以在此处查看完整错误:

https://drive.google.com/file/d/1FmV5kdb7p6TgEZwKBFDmFIszC-Qha0BD/view?usp=sharing

我的脚本有很多导入,它们是:-

import tkinter as tk  
import os
import time
import sys
from PyQt5 import QtWidgets, QtCore, QtGui
from PIL import ImageGrab
import numpy as np
import cv2
import pytesseract
import webview

这个错误是什么意思?为什么我会得到它?

最佳答案

您需要正确编写命令,例如:

pyinstaller --add-data web_folder;web_folder --add-data db.sqlite;. gui.py

描述:title_of_folder_or_file;path_to_it(如果你的 OS Windows 使用“;”,否则为“:”。在 Windows 上它是 100% 但在 linux 或 mac 上我不知道)你需要的文件夹;设置此文件夹的路径,例如 web_folder;web_folder

来源 - Official Documentation

关于python - py安装程序 "unable to find a txt file when adding a binary",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64022012/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com