mirror of
https://github.com/fxsjy/jieba.git
synced 2025-07-24 00:00:05 +08:00
raise exception in case of lower version
This commit is contained in:
parent
e68bb5a28e
commit
0f972df0ac
@ -301,7 +301,8 @@ def enable_parallel(processnum):
|
||||
global pool,cut,cut_for_search
|
||||
if os.name=='nt':
|
||||
raise Exception("jieba: parallel mode only supports posix system")
|
||||
|
||||
if sys.version_info.major==2 and sys.version_info.minor<6:
|
||||
raise Exception("jieba: the parallel feature needs Python version>2.5 ")
|
||||
from multiprocessing import Pool,cpu_count
|
||||
if processnum==None:
|
||||
processnum = cpu_count()
|
||||
|
Loading…
x
Reference in New Issue
Block a user