fix: update opencc package name and installation command to match current library requirements

This commit is contained in:
tigerenwork 2026-04-11 20:59:15 +08:00
parent 97a9c929c0
commit 287d2e1a0c
1 changed files with 2 additions and 2 deletions

View File

@ -5,9 +5,9 @@ import glob
try: try:
from opencc import OpenCC from opencc import OpenCC
except ImportError: except ImportError:
print("Error: 'opencc-python' package not found. Installing...") print("Error: 'opencc' package not found. Installing...")
import subprocess import subprocess
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'opencc-python']) subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'opencc'])
from opencc import OpenCC from opencc import OpenCC
def convert_filename(filename, cc): def convert_filename(filename, cc):