meta-llama / llama

Inference code for Llama models
Other
55.85k stars 9.51k forks source link

Python: from llama2 import KnowledgeBase produces error #1050

Open grafsoft opened 7 months ago

grafsoft commented 7 months ago

I get this error in VSCode:

Cannot import KnowledgeBase from llama2 (/data/../Site-packages/llama2/init.py)

The directory has this content: -rw-rw-r-- 1 pgraf pgraf 2 Feb 28 17:10 init.py drwxrwxr-x 2 pgraf pgraf 4096 Feb 28 17:10 pycache

init.py is empty.

Installed with "pip install llama2", also with git clone https://github.com/facebookresearch/llama.git python3 setup.py install

I took care of being in the right venv environment.

Python 3.10.12 VSCode 1.87.0 Ubuntu 22.04, updated and upgraded

subramen commented 6 months ago

We don't have any module called "KnowledgeBase" in this project. Are you sure you're running the right code?

Looks like you're pip installing the wrong package. Please follow the instructions in the README https://github.com/meta-llama/llama?tab=readme-ov-file#quick-start