facebookresearch / DrQA

Reading Wikipedia to Answer Open-Domain Questions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SyntaxError

DrewRidley opened this issue · comments

root@ubuntu-s-4vcpu-8gb-nyc1-01:~/DrQA# python scripts/pipeline/interactive.py
Traceback (most recent call last):
File "scripts/pipeline/interactive.py", line 16, in
from drqa import pipeline
File "/root/DrQA/drqa/init.py", line 20, in
from . import tokenizers
File "/root/DrQA/drqa/tokenizers/init.py", line 20, in
from .corenlp_tokenizer import CoreNLPTokenizer
File "/root/DrQA/drqa/tokenizers/corenlp_tokenizer.py", line 14, in
import pexpect
File "/usr/local/lib/python3.8/dist-packages/pexpect-4.2.1-py3.8.egg/pexpect/init.py", line 75, in
from .pty_spawn import spawn, spawnu
File "/usr/local/lib/python3.8/dist-packages/pexpect-4.2.1-py3.8.egg/pexpect/pty_spawn.py", line 14, in
from .spawnbase import SpawnBase
File "/usr/local/lib/python3.8/dist-packages/pexpect-4.2.1-py3.8.egg/pexpect/spawnbase.py", line 224
def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
^
SyntaxError: invalid syntax

After installing I receive the following syntax error. I am using python 3.8.5

same here.

#255

This seems to explain (and solve) the issue.

had the same problem on ubuntu 18.04 using python3.7.10, went to #255 and solved it using pexpect (without the -u option it seems that it won't work). but now i have to install torch for some reason (it's not specified in requirements.txt)

this repo not support for python 3.7+ you should downgrade to 3.6

commented

pip install -I pexpect
It may be useful.