ramsrigouthamg / Questgen.ai

Question generation using state-of-the-art Natural Language Processing algorithms
https://questgen.ai/
MIT License
900 stars 287 forks source link

ModuleNotFoundError: No module named 'Questgen'` #49

Open kanranmm opened 2 years ago

kanranmm commented 2 years ago

I did all these:

pip install git+https://github.com/ramsrigouthamg/Questgen.ai pip install git+https://github.com/boudinfl/pke.git@69337af9f9e72a25af6d7991eaa9869f1322dd72 python -m nltk.downloader universal_tagset python -m spacy download en

Then when I run:

from pprint import pprint import nltk nltk.download('stopwords') from Questgen import main qe= main.BoolQGen() payload = { "input_text": "Sachin Ramesh Tendulkar is a former international cricketer from India and a former captain of the Indian national team. He is widely regarded as one of the greatest batsmen in the history of cricket. He is the highest run scorer of all time in International cricket." } output = qe.predict_boolq(payload) pprint (output)

I get the following error:

`--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last)

in 2 import nltk 3 nltk.download('stopwords') ----> 4 from Questgen import main 5 qe= main.BoolQGen() 6 payload = { ModuleNotFoundError: No module named 'Questgen'` Please help
whitewhistle commented 1 year ago

were you able to solve it?

rionarth commented 1 year ago

I encountered the same problem.

pooyaEst commented 1 year ago

Many of the packages in setup.py and requirements.txt are outdated and not compatible with with newer python versions updating packages to last version also causes some other problems

Cheng-SQ0716 commented 1 year ago

I also have some problems in google colab, it could not run successfully due to the outdated versions of packages and dependecies

At the same time, some package versions have some conflicts

Do you think creating a virtual environment could solve it?

pooyaEst commented 1 year ago

It might help although not the optimal solution, the project doesn't seem abandoned so maybe it can be updated by core team or other contributors . i tried to update packages but just like you the conflicts prevented me. might work on it later but as I'm not familiar with the code it wont be easy.

pooyaEst commented 1 year ago

@Cheng-SQ0716 @Rionarth @kanranmm @whitewhistle fixed problems in forked repo https://github.com/pooyaEst/Questgen.ai , in colab (updated link in readme of https://github.com/pooyaEst/Questgen.ai ) remember to change git repo to https://github.com/pooyaEst/Questgen.ai

AliHaider20 commented 9 months ago

This is solved. Close it