I tried to run the following part of the codes locally
! pip install langchain
from langchain.document_loaders.generic import GenericLoader, FileSystemBlobLoader
from langchain.document_loaders.parsers import OpenAIWhisperParser
from langchain.document_loaders.blob_loaders.youtube_audio import YoutubeAudioLoader
but I’ve got the following error when importing the required libraries. What am I missing here?
It looks like you’re encountering this issue because the required components might not be included in the langchain
package you’re using.
Try using langchain_community
instead of langchain
— it should include the missing modules you’re trying to import. Here’s how you can do it:
pip install langchain_community
Then try running your code again, and the imports should work as expected:
from langchain.document_loaders.generic import GenericLoader, FileSystemBlobLoader
from langchain.document_loaders.parsers import OpenAIWhisperParser
from langchain.document_loaders.blob_loaders.youtube_audio import YoutubeAudioLoader
Let me know if that works for you!
1 Like