fix: update opencc package name and installation command to match current library requirements
This commit is contained in:
parent
97a9c929c0
commit
287d2e1a0c
|
|
@ -5,9 +5,9 @@ import glob
|
|||
try:
|
||||
from opencc import OpenCC
|
||||
except ImportError:
|
||||
print("Error: 'opencc-python' package not found. Installing...")
|
||||
print("Error: 'opencc' package not found. Installing...")
|
||||
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
|
||||
|
||||
def convert_filename(filename, cc):
|
||||
|
|
|
|||
Loading…
Reference in New Issue