[GH-ISSUE #114] ModuleNotFoundError: No module named 'janus' #85

Open
opened 2026-10-26 21:11:50 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @wrharper on GitHub (Jan 31, 2025).
Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/114

(Test) C:\Users\****\source\repos\OpenWebUI\Test>python demo\app_januspro.py
Traceback (most recent call last):
  File "C:\Users\****\source\repos\OpenWebUI\Test\demo\app_januspro.py", line 4, in <module>
    from janus.models import MultiModalityCausalLM, VLChatProcessor
ModuleNotFoundError: No module named 'janus'

This happens despite having the virtual environment active.

Image

Originally created by @wrharper on GitHub (Jan 31, 2025). Original GitHub issue: https://github.com/deepseek-ai/Janus/issues/114 ``` (Test) C:\Users\****\source\repos\OpenWebUI\Test>python demo\app_januspro.py Traceback (most recent call last): File "C:\Users\****\source\repos\OpenWebUI\Test\demo\app_januspro.py", line 4, in <module> from janus.models import MultiModalityCausalLM, VLChatProcessor ModuleNotFoundError: No module named 'janus' ``` This happens despite having the virtual environment active. ![Image](https://github.com/user-attachments/assets/16b144f7-bf4b-4de3-ba00-1ba6e7f50a16)
Author
Owner

@wrharper commented on GitHub (Jan 31, 2025):

Image

<!-- gh-comment-id:2626991328 --> @wrharper commented on GitHub (Jan 31, 2025): ![Image](https://github.com/user-attachments/assets/3a223c31-00b8-43ab-a03d-00ff3ede2c46)
Author
Owner

@wrharper commented on GitHub (Jan 31, 2025):

pyvenv.cfg
home = C:\Users****\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0
include-system-site-packages = false
version = 3.9.13

I thought it might be the version, but it checks out too?

<!-- gh-comment-id:2627030127 --> @wrharper commented on GitHub (Jan 31, 2025): pyvenv.cfg home = C:\Users\****\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0 include-system-site-packages = false version = 3.9.13 I thought it might be the version, but it checks out too?
Author
Owner

@xiaobuguilaile commented on GitHub (Feb 10, 2025):

easy!

add below code in top of "app_januspro.py":

import sys
import os
project_root = os.path.dirname(os.path.dirname(os.path.abspath(file)))
sys.path.append(project_root)

<!-- gh-comment-id:2646849059 --> @xiaobuguilaile commented on GitHub (Feb 10, 2025): easy! add below code in top of "app_januspro.py": import sys import os project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(project_root)
Author
Owner

@elieqihou commented on GitHub (Feb 27, 2025):

pip install -e .

<!-- gh-comment-id:2687220695 --> @elieqihou commented on GitHub (Feb 27, 2025): pip install -e .
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/Janus#85
No description provided.