kotaemon icon indicating copy to clipboard operation
kotaemon copied to clipboard

[BUG] - <title> No Module names 'Kotaemon'

Open akshatsingh523 opened this issue 1 year ago • 10 comments

Description

I have followed all the steps told creating the environment and for cloning the repo installing the requirements and everything but after running the final step python app.py i am getting an issue which is no module named 'kotaemon' can anyone please suggest how to sort this out. I am using Python 3.10.0 version I also used Python 3.12 but then also issue was similar

Reproduction steps

Go to the cloned repository directory.
Click on the terminal or command prompt.
Run python app.py.
See error: ModuleNotFoundError: No module named 'kotaemon'.

Screenshots

![DESCRIPTION](LINK.png)
https://drive.google.com/file/d/1biI3anxdn0dgQhuhTDkErD09i8WXB6N_/view?usp=sharing

Logs

Traceback (most recent call last):
  File "E:\kotaemon\app.py", line 13, in <module>
    from ktem.main import App  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\kotaemon\libs\ktem\ktem\main.py", line 2, in <module>
    from ktem.app import BaseApp
  File "E:\kotaemon\libs\ktem\ktem\app.py", line 8, in <module>
    from ktem.components import reasonings
  File "E:\kotaemon\libs\ktem\ktem\components.py", line 11, in <module>  
    from kotaemon.base import BaseComponent
ModuleNotFoundError: No module named 'kotaemon'

Browsers

No response

OS

Windows

Additional information

I have been facing this problem since a week please help me solve this issue thanks !

akshatsingh523 avatar Sep 10 '24 07:09 akshatsingh523

I got the same, but I downloaded user installer app (https://github.com/Cinnamon/kotaemon/releases) to run sctipt to install ENV

then in vs code I changed to env = kotaemon-app\install_dir\env

kksasa avatar Sep 10 '24 09:09 kksasa

I got the same, but I downloaded user installer app (https://github.com/Cinnamon/kotaemon/releases) to run sctipt to install ENV

then in vs code I changed to env = kotaemon-app\install_dir\env

Can you elaborate about this I downloaded the app which you told and then run the script on my windows it is currently running is that it ?

akshatsingh523 avatar Sep 10 '24 11:09 akshatsingh523

Actually Previously also I downloaded the app set up the LLM embedding and the index but then also when I inputted the file I was getting that the error that file could not be find at specific location so don't know what is wrong there

akshatsingh523 avatar Sep 10 '24 11:09 akshatsingh523

Hi, did you follow the setup process to install from source as mentioned here https://github.com/Cinnamon/kotaemon#without-docker

taprosoft avatar Sep 11 '24 03:09 taprosoft

Hi, did you follow the setup process to install from source as mentioned here https://github.com/Cinnamon/kotaemon#without-docker

Hi So I am getting 2 errors after running this as told without docker firstly when the UI is coming i was earlier getting that dataset not found error and now it was showing that authentication error even after my llm embedding running then also can you please help me sort this issue

akshatsingh523 avatar Sep 11 '24 09:09 akshatsingh523

@akshatsingh523 Please clarify the issues and provide the error logs or screenshots if possible. As I understand, you successfully launched the UI but then got errors during runtime, didn't you?

cin-albert avatar Sep 12 '24 03:09 cin-albert

Traceback (most recent call last): File "E:\kotaemon\app.py", line 13, in from ktem.main import App # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\kotaemon\libs\ktem\ktem\main.py", line 2, in from ktem.app import BaseApp File "E:\kotaemon\libs\ktem\ktem\app.py", line 8, in from ktem.components import reasonings File "E:\kotaemon\libs\ktem\ktem\components.py", line 11, in
from kotaemon.base import BaseComponent ModuleNotFoundError: No module named 'kotaemon'

drtusharrasal avatar Sep 19 '24 08:09 drtusharrasal

@akshatsingh523 Please clarify the issues and provide the error logs or screenshots if possible. As I understand, you successfully launched the UI but then got errors during runtime, didn't you?

I am not able to even run after one time there is some error when i run the UI after setting everything up there is error which says authentication error and previously it was showing dataset not found as much as i remember. and when i am trying to run from code i am getting no module named kotaemon error

akshatsingh523 avatar Sep 19 '24 17:09 akshatsingh523

I followed the steps in the readme for Installation without docker. The only thing: I did not create the optional conda env, but instead created a .venv myself in VSCode installed all references and then when running python app.py the following error occurs:

    from ktem.main import App  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\USER\kotaemon\libs\ktem\ktem\main.py", line 3, in <module>
    from ktem.app import BaseApp
  File "C:\USER\kotaemon\libs\ktem\ktem\app.py", line 8, in <module>
    from ktem.components import reasonings
  File "C:\USER\kotaemon\libs\ktem\ktem\components.py", line 11, in <module>
    from kotaemon.base import BaseComponent
ModuleNotFoundError: No module named 'kotaemon' ```

So no this does not occur during runtime, it occurs during build. It seems the code is calling to a library file that is either not correctly referenced or not installed.

@kksasa what do you mean you used the ENV from the standalone?

busssard avatar Oct 17 '24 07:10 busssard

Ok i figured out what happened. During install of pip install -e "libs/kotaemon[all]" the following error occurs when installing llama-hub:


> 
> INFO: pip is looking at multiple versions of kotaemon to determine which version is compatible with other requirements. This could take a while.
> ERROR: Ignored the following versions that require a different python version: 0.0.46 Requires-Python >=3.8.1,<3.12; 0.0.47 Requires-Python >=3.8.1,<3.12; 0.0.47.post1 Requires-Python >=3.8.1,<3.12; 0.0.48 Requires-Python >=3.8.1,<3.12; 0.0.50 Requires-Python >=3.8.1,<3.12; 0.0.52 Requires-Python >=3.8.1,<3.12; 0.0.54 Requires-Python >=3.8.1,<3.12; 0.0.55 Requires-Python >=3.8.1,<3.12; 0.0.55.post1 Requires-Python >=3.8.1,<3.12; 0.0.56 Requires-Python >=3.8.1,<3.12; 0.0.56.post1 Requires-Python >=3.8.1,<3.12; 0.0.57 Requires-Python >=3.8.1,<3.12; 0.0.58 Requires-Python >=3.8.1,<3.12; 0.0.58.post1 Requires-Python >=3.8.1,<3.12; 0.0.59 Requires-Python >=3.8.1,<3.12; 0.0.60 
> Requires-Python >=3.8.1,<3.12; 0.0.61 Requires-Python >=3.8.1,<3.12; 0.0.62 Requires-Python >=3.8.1,<3.12; 0.0.64 Requires-Python >=3.8.1,<3.12; 0.0.65 Requires-Python >=3.8.1,<3.12; 0.0.66 Requires-Python >=3.8.1,<3.12; 0.0.67 Requires-Python >=3.8.1,<3.12; 0.0.68.post1 Requires-Python >=3.8.1,<3.12; 0.0.69 Requires-Python >=3.8.1,<3.12; 0.0.70 Requires-Python >=3.8.1,<3.12; 0.0.71 Requires-Python >=3.8.1,<3.12; 0.0.72 Requires-Python >=3.8.1,<3.12; 0.0.73 Requires-Python >=3.8.1,<3.12; 0.0.74 Requires-Python >=3.8.1,<3.12; 0.0.75 Requires-Python >=3.8.1,<3.12; 0.0.76 Requires-Python >=3.8.1,<3.12; 0.0.77 Requires-Python >=3.8.1,<3.12; 0.0.78 Requires-Python >=3.8.1,<3.12; 0.0.79 Requires-Python >=3.8.1,<3.12; 0.0.79.post1 Requires-Python >=3.8.1,<3.12; 0.1.0 Requires-Python <3.12,>=3.8; 4.0.0 Requires-Python >=3.7,<3.11
> ERROR: Could not find a version that satisfies the requirement llama-hub<0.1.0,>=0.0.79 (from kotaemon) (from versions: 0.0.1a1, 0.0.1a2, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.14, 0.0.15, 0.0.16, 0.0.18, 0.0.19, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.24.post1, 0.0.25, 0.0.26, 0.0.27, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.40, 0.0.41, 0.0.42, 0.0.43, 0.0.44, 0.0.45)
> ERROR: No matching distribution found for llama-hub<0.1.0,>=0.0.79

this prevents Kotaemon to be built. i assumed installing llama-hub afterwards would be enough, but it isnt. So if you are using Python3.12: Under libs/kotaemon/kotaemon/pyproject.toml

change "llama-hub>=0.0.79,<0.1.0", to "llama-hub",

then the pip install -e "libs/kotaemon[all]" should execute successfully!

busssard avatar Oct 17 '24 08:10 busssard