[Python] local package shows in pip list but not recognized when imported

Discussão em 'Python' iniciado por Stack, Fevereiro 25, 2025.

  1. Stack

    Stack Membro Participativo

    I have file structure as follows

    - project
    - LLaVA-NeXT
    - llava
    - __init__.py
    - ...

    - playground
    - models
    - script.py


    In script.py, I did from llava.model.builder import load_pretrained_model but I get ModuleNotFoundError: No module named 'llava.mm_utils'; 'llava' is not a package. I installed the LLaVA-NeXT locally as editable package following this and it shows up in pip list as llava 1.7.0.dev0 /home/username/project/LLaVA-NeXT. What am I doing wrong? How do I make the import work for the script?

    Continue reading...

Compartilhe esta Página