Zack Saadioui
8/24/2024
1
ModuleNotFoundError
1
LangChain
1
ModuleNotFoundError: No module named 'langchain'
1
ModuleNotFoundError
1
ModuleNotFoundError
1
2
bash
pip show langchain
1
2
bash
pip install langchain
1
2
bash
pip install --upgrade langchain
1
2
3
python
import langchain
from langchain.document_loaders import DirectoryLoader
1
ModuleNotFoundError
1
2
3
python
import sys
print(sys.path)
1
2
python
sys.path.append('/path/to/your/langchain/directory')
1
2
bash
conda install -c conda-forge langchain
1
2
bash
conda activate your_env_name
1
2
bash
pip show langchain
1
2
bash
pip list | grep langchain
1
2
bash
where python
1
2
python
from langchain.document_loaders import DirectoryLoader
1
2
3
4
bash
python -m venv new_env_name
source new_env_name/bin/activate # On Windows use new_env_nameinor activate
pip install langchain
1
ModuleNotFoundError: No module named 'langchain'
Copyright © Arsturn 2024