NTMC-Community / MatchZoo

Facilitating the design, comparison and sharing of deep text matching models.
Apache License 2.0
3.84k stars 897 forks source link

Import Error #841

Open lovekittynine opened 3 years ago

lovekittynine commented 3 years ago

Describe the bug

error occurs when import matchzoo

Describe your attempts

import matchzoo as mz Traceback (most recent call last): File "", line 1, in File "/app/python_venv/lib/python3.5/site-packages/matchzoo/init.py", line 13, in from .data_pack import DataPack File "/app/python_venv/lib/python3.5/site-packages/matchzoo/data_pack/init.py", line 1, in from .data_pack import DataPack, load_data_pack File "/app/python_venv/lib/python3.5/site-packages/matchzoo/data_pack/data_pack.py", line 215 f'{data_file_path} already exist, fail to save') ^ SyntaxError: invalid syntax

Context

centos7 matchzoo 2.2.0

takiholadi commented 3 years ago

Try Python 3.6 or 3.7, not 3.5.

The line with SyntaxError you provided is so-called "f-string", it is available since Python 3.6.