@@ -51,6 +51,26 @@ def determine_opencc_version():
51
51
return "opencc" # default
52
52
53
53
54
+ def determine_scipy_version ():
55
+ # get python version
56
+ python_version = f"{ sys .version_info .major } .{ sys .version_info .minor } "
57
+
58
+ # determine scipy version
59
+ if python_version == "3.8" :
60
+ return "scipy>=1.4.0, <=1.12.0" # Python3.8 need scipy>=1.4.0, <=1.12.0
61
+ return "scipy" # default
62
+
63
+
64
+ def determine_matplotlib_version ():
65
+ # get python version
66
+ python_version = f"{ sys .version_info .major } .{ sys .version_info .minor } "
67
+
68
+ # determine matplotlib version
69
+ if python_version == "3.8" or python_version == "3.9" :
70
+ return "matplotlib<=3.8.4" # Python3.8/9 need matplotlib<=3.8.4
71
+ return "matplotlib" # default
72
+
73
+
54
74
base = [
55
75
"braceexpand" ,
56
76
"editdistance" ,
@@ -63,9 +83,9 @@ def determine_opencc_version():
63
83
# paddleaudio align with librosa==0.8.1, which need numpy==1.23.x
64
84
"numpy==1.23.5" ,
65
85
"librosa==0.8.1" ,
66
- " scipy>=1.4.0, <=1.12.0" ,
86
+ determine_scipy_version (), # scipy or scipy >=1.4.0, <=1.12.0
67
87
"loguru" ,
68
- " matplotlib<=3.8.4" ,
88
+ determine_matplotlib_version (), # matplotlib or matplotlib <=3.8.4
69
89
"nara_wpe" ,
70
90
"onnxruntime>=1.11.0" ,
71
91
determine_opencc_version (), # opencc or opencc==1.1.6
@@ -92,7 +112,7 @@ def determine_opencc_version():
92
112
"ToJyutping" ,
93
113
"typeguard" ,
94
114
"webrtcvad" ,
95
- "yacs~ =0.1.8" ,
115
+ "yacs> =0.1.8" ,
96
116
"zhon" ,
97
117
]
98
118
0 commit comments