Merge pull request #15 from 4Aiur/pr

修复Fedora Linux 下无法直接运行的问题
This commit is contained in:
LibraHp_0928 2024-09-11 16:30:57 +08:00 committed by GitHub
commit 8a44c17276
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import re
from tqdm import trange,tqdm
import requests
import time
import platform
# 信号处理函数
def signal_handler(signal, frame):

View File

@ -1,7 +1,17 @@
import sys
import requests
from PIL import Image
import qrcode
from pyzbar.pyzbar import decode
import platform
try:
from pyzbar.pyzbar import decode
except Exception as e:
print("无法找到 zbar 共享库。请确保安装了 zbar。")
if platform.system() == "Linux":
print("对于基于 RPM 的系统(如 Fedora), 您可以运行以下命令:")
print("sudo dnf install -y zbar")
print("有关更多安装指南,请参考 zbar 的官方文档或您的发行版文档。")
sys.exit(1)
import time
import re
import util.ConfigUtil as Config