Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'drqa' #255

Open
JamesRead5737 opened this issue Jun 21, 2020 · 1 comment
Open

ModuleNotFoundError: No module named 'drqa' #255

JamesRead5737 opened this issue Jun 21, 2020 · 1 comment

Comments

@JamesRead5737
Copy link

JamesRead5737 commented Jun 21, 2020

When I run python3.8 scripts/pipeline/interactive.py I get the following error:

Traceback (most recent call last):
  File "scripts/pipeline/interactive.py", line 16, in <module>
    from drqa import pipeline
ModuleNotFoundError: No module named 'drqa'

Following output shows that setup.py script did not put drqa into my python path:

>>> import sys; print(sys.path)
['', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/yaakov/all/DrQA/pytorch_awesome/pytorch-awesome/lib/python3.8/site-packages']

So I added the path manually to PYTHONPATH like so:

export PYTHONPATH="/home/yaakov/all/DrQA/"

Running python3.8 scripts/pipeline/interactive.py then produces the following:

$ python3.8 scripts/pipeline/interactive.py 
Traceback (most recent call last):
  File "scripts/pipeline/interactive.py", line 16, in <module>
    from drqa import pipeline
  File "/home/yaakov/all/DrQA/drqa/__init__.py", line 20, in <module>
    from . import tokenizers
  File "/home/yaakov/all/DrQA/drqa/tokenizers/__init__.py", line 20, in <module>
    from .corenlp_tokenizer import CoreNLPTokenizer
  File "/home/yaakov/all/DrQA/drqa/tokenizers/corenlp_tokenizer.py", line 14, in <module>
    import pexpect
  File "/home/yaakov/all/DrQA/pytorch_awesome/pytorch-awesome/lib/python3.8/site-packages/pexpect/__init__.py", line 75, in <module>
    from .pty_spawn import spawn, spawnu
  File "/home/yaakov/all/DrQA/pytorch_awesome/pytorch-awesome/lib/python3.8/site-packages/pexpect/pty_spawn.py", line 14, in <module>
    from .spawnbase import SpawnBase
  File "/home/yaakov/all/DrQA/pytorch_awesome/pytorch-awesome/lib/python3.8/site-packages/pexpect/spawnbase.py", line 224
    def expect(self, pattern, timeout=-1, searchwindowsize=-1, async=False):
                                                               ^
SyntaxError: invalid syntax

With python3.6 the script gets a little further:

$ python3.6 scripts/pipeline/interactive.py 
Traceback (most recent call last):
  File "scripts/pipeline/interactive.py", line 16, in <module>
    from drqa import pipeline
  File "/home/yaakov/all/DrQA/drqa/__init__.py", line 22, in <module>
    from . import retriever
  File "/home/yaakov/all/DrQA/drqa/retriever/__init__.py", line 36, in <module>
    from .doc_db import DocDB
  File "/home/yaakov/all/DrQA/drqa/retriever/doc_db.py", line 9, in <module>
    import sqlite3
  File "/usr/local/lib/python3.6/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/lib/python3.6/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

Has anybody ever succeeded in getting this running on Ubuntu?

@dbakuntsev
Copy link

It would seem that pexpect package version is incompatible. Run pip install -U pexpect to update it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants