devika icon indicating copy to clipboard operation
devika copied to clipboard

python devika.py not working

Open Adele583 opened this issue 11 months ago • 10 comments

PS C:\Users\hacke\Downloads\devika> python devika.py 24.03.23 06:25:40: root: WARNING: Ollama server not running, please start the server to use models from Ollama. 24.03.23 06:25:56: root: INFO : Booting up... This may take a few seconds 24.03.23 06:25:56: root: INFO : Initializing Devika... 24.03.23 06:25:56: root: INFO : Initializing Prerequisites Jobs... 24.03.23 06:25:56: root: INFO : Loading sentence-transformer BERT models... Traceback (most recent call last): File "C:\Users\hacke\Downloads\devika\devika.py", line 207, in init_devika() File "C:\Users\hacke\Downloads\devika\src\init.py", line 28, in init_devika SentenceBert(prompt).extract_keywords() ^^^^^^^^^^^^^^^^^^^^ File "C:\Users\hacke\Downloads\devika\src\bert\sentence.py", line 6, in init self.kw_model = KeyBERT() ^^^^^^^^^ File "C:\Users\hacke\AppData\Local\Programs\Python\Python312\Lib\site-packages\keybert_model.py", line 57, in init self.model = select_backend(model) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\hacke\AppData\Local\Programs\Python\Python312\Lib\site-packages\keybert\backend_utils.py", line 47, in select_backend from .sentencetransformers import SentenceTransformerBackend File "C:\Users\hacke\AppData\Local\Programs\Python\Python312\Lib\site-packages\keybert\backend_sentencetransformers.py", line 3, in from sentence_transformers import SentenceTransformer File "C:\Users\hacke\AppData\Local\Programs\Python\Python312\Lib\site-packages\sentence_transformers_init.py", line 3, in from .datasets import SentencesDataset, ParallelSentencesDataset File "C:\Users\hacke\AppData\Local\Programs\Python\Python312\Lib\site-packages\sentence_transformers\datasets_init_.py", line 1, in from .DenoisingAutoEncoderDataset import DenoisingAutoEncoderDataset File "C:\Users\hacke\AppData\Local\Programs\Python\Python312\Lib\site-packages\sentence_transformers\datasets\DenoisingAutoEncoderDataset.py", line 1, in from torch.utils.data import Dataset File "C:\Users\hacke\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils_init_.py", line 4, in from .throughput_benchmark import ThroughputBenchmark File "C:\Users\hacke\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\utils\throughput_benchmark.py", line 2, in import torch._C ModuleNotFoundError: No module named 'torch._C' image

Adele583 avatar Mar 23 '24 05:03 Adele583

anyone who can help will really be appreciated

Adele583 avatar Mar 23 '24 05:03 Adele583

l tried pip install torch._C and get this: image

Adele583 avatar Mar 23 '24 05:03 Adele583

did you activate python venv? did you try reinstalling pytorch pip install torch

bugthug404 avatar Mar 23 '24 06:03 bugthug404

did you activate python venv? did you try reinstalling pytorch pip install torch

no l never activated python venv

Adele583 avatar Mar 23 '24 06:03 Adele583

please how do l do it

Adele583 avatar Mar 23 '24 06:03 Adele583

you can do it by python uv package command is uv venv or go through the installation process step by step https://github.com/stitionai/devika/blob/main/README.md

bugthug404 avatar Mar 23 '24 06:03 bugthug404

thank you bugthug404

Adele583 avatar Mar 23 '24 06:03 Adele583

hi @Adele583 is this resolved? do you still need help?

thanks @bugthug404 for the swift response!

123vivekr avatar Mar 23 '24 08:03 123vivekr

Same issue here, I have tested it with the venv activated and without it. Have already tried the solution here and didn't work. If anyone could help it would be appreciated. I'm on a virtual machine with ubuntu 22.04 btw, idk if it's relevant

bautistaib avatar Mar 23 '24 18:03 bautistaib

try 'python3 devika.py' Also https://github.com/astral-sh/uv has a lot of useful info. After you 'uv venv' the virtual environment needs to be activated. The command is system dependent, but that link has it.

javacaliente avatar Mar 24 '24 08:03 javacaliente

create virtual env in python. search how to create venv in python. install the requirements.txt then it will work. also fetch the latest changes.

ARajgor avatar Apr 03 '24 18:04 ARajgor