Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No module named 'langchain_community' - Installing the missing module #2

Open
0xlowell opened this issue May 27, 2024 · 0 comments
Open

Comments

@0xlowell
Copy link

Hello,

(it's my first issue report on public repo, I hope it's helpful )

Issue Report:

Description:
I encountered the following error after installing the project in a virtual environment directly from a Git clone:

ModuleNotFoundError: No module named 'langchain_community'

Resolution:
This issue can be easily resolved by installing the missing module:

pip install -U langchain-community && pip freeze > requirements.txt

Detailed Description:

Installing collected packages: sortedcontainers, pytz, validators, urllib3, tzdata, typing-extensions, tqdm, tornado, toolz, toml, tenacity, soupsieve, sniffio, smmap, six, rpds-py, regex, PyYAML, pysocks, PyPDF2, pyparsing, pygments, protobuf, prometheus-client, pillow, packaging, orjson, numpy, multidict, more-itertools, mdurl, MarkupSafe, markdown, lxml, kiwisolver, jsonpointer, idna, h11, frozenlist, fonttools, exceptiongroup, entrypoints, distro, cycler, click, charset-normalizer, certifi, cachetools, blinker, attrs, async-timeout, annotated-types, yarl, wsproto, SQLAlchemy, requests, referencing, python-dateutil, pymdown-extensions, pydantic-core, pyarrow, outcome, markdown-it-py, jsonpatch, jinja2, httpcore, htbuilder, gitdb, faiss-cpu, contourpy, beautifulsoup4, anyio, aiosignal, trio, tiktoken, st-annotated-text, rich, pydeck, pydantic, pandas, matplotlib, jsonschema-specifications, httpx, gitpython, favicon, faker, aiohttp, trio-websocket, openai, langsmith, jsonschema, selenium, langchain-core, altair, streamlit, langchain-text-splitters, streamlit-vertical-slider, streamlit-toggle-switch, streamlit_option_menu, streamlit-keyup, streamlit-image-coordinates, streamlit-embedcode, streamlit-card, streamlit-camera-input-live, langchain, streamlit-faker, markdownlit, streamlit_extras
Successfully installed MarkupSafe-2.1.5 PyPDF2-3.0.1 PyYAML-6.0.1 SQLAlchemy-2.0.30 aiohttp-3.9.5 aiosignal-1.3.1 altair-5.3.0 annotated-types-0.7.0 anyio-4.4.0 async-timeout-4.0.3 attrs-23.2.0 beautifulsoup4-4.12.3 blinker-1.8.2 cachetools-5.3.3 certifi-2024.2.2 charset-normalizer-3.3.2 click-8.1.7 contourpy-1.2.1 cycler-0.12.1 distro-1.9.0 entrypoints-0.4 exceptiongroup-1.2.1 faiss-cpu-1.8.0 faker-25.2.0 favicon-0.7.0 fonttools-4.52.1 frozenlist-1.4.1 gitdb-4.0.11 gitpython-3.1.43 h11-0.14.0 htbuilder-0.6.2 httpcore-1.0.5 httpx-0.27.0 idna-3.7 jinja2-3.1.4 jsonpatch-1.33 jsonpointer-2.4 jsonschema-4.22.0 jsonschema-specifications-2023.12.1 kiwisolver-1.4.5 langchain-0.2.1 langchain-core-0.2.1 langchain-text-splitters-0.2.0 langsmith-0.1.63 lxml-5.2.2 markdown-3.6 markdown-it-py-3.0.0 markdownlit-0.0.7 matplotlib-3.9.0 mdurl-0.1.2 more-itertools-10.2.0 multidict-6.0.5 numpy-1.26.4 openai-1.30.3 orjson-3.10.3 outcome-1.3.0.post0 packaging-23.2 pandas-2.2.2 pillow-10.3.0 prometheus-client-0.20.0 protobuf-4.25.3 pyarrow-16.1.0 pydantic-2.7.1 pydantic-core-2.18.2 pydeck-0.9.1 pygments-2.18.0 pymdown-extensions-10.8.1 pyparsing-3.1.2 pysocks-1.7.1 python-dateutil-2.9.0.post0 pytz-2024.1 referencing-0.35.1 regex-2024.5.15 requests-2.32.2 rich-13.7.1 rpds-py-0.18.1 selenium-4.21.0 six-1.16.0 smmap-5.0.1 sniffio-1.3.1 sortedcontainers-2.4.0 soupsieve-2.5 st-annotated-text-4.0.1 streamlit-1.35.0 streamlit-camera-input-live-0.2.0 streamlit-card-1.0.2 streamlit-embedcode-0.1.2 streamlit-faker-0.0.3 streamlit-image-coordinates-0.1.6 streamlit-keyup-0.2.4 streamlit-toggle-switch-1.0.2 streamlit-vertical-slider-2.5.5 streamlit_extras-0.4.2 streamlit_option_menu-0.3.12 tenacity-8.3.0 tiktoken-0.7.0 toml-0.10.2 toolz-0.12.1 tornado-6.4 tqdm-4.66.4 trio-0.25.1 trio-websocket-0.11.1 typing-extensions-4.12.0 tzdata-2024.1 urllib3-2.2.1 validators-0.28.3 wsproto-1.2.0 yarl-1.9.4
WARNING: You are using pip version 22.0.4; however, version 24.0 is available.
You should consider upgrading via the ‘***/AI-Powered-Resume-Analyzer-and-LinkedIn-Scraper-with-Selenium/venv/bin/python -m pip install --upgrade pip' command.
(venv) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
***/AI-Powered-Resume-Analyzer-and-LinkedIn-Scraper-with-Selenium (main*) » ls                                                                                                        
AI_Powered_Resume_Analyzer.ipynb     LinkedIn_scraper_with_Selenium.ipynb Thumbnail.jpg                        packages.txt                         venv
LICENSE.md                           README.md                            app.py                               requirements.txt
(venv) --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
***/AI-Powered-Resume-Analyzer-and-LinkedIn-Scraper-with-Selenium (main*) » streamlit run app.py                                                                                      

      👋 Welcome to Streamlit!

      If you’d like to receive helpful onboarding emails, news, offers, promotions,
      and the occasional swag, please enter your email address below. Otherwise,
      leave this field blank.

      Email:  

  You can find our privacy policy at https://streamlit.io/privacy-policy

  Summary:
  - This open source library collects usage statistics.
  - We cannot see and do not store information contained inside Streamlit apps,
    such as text, charts, images, etc.
  - Telemetry data is stored in servers in the United States.
  - If you'd like to opt out, add the following to ~/.streamlit/config.toml,
    creating that file if necessary:

    [browser]
    gatherUsageStats = false


  You can now view your Streamlit app in your browser.

  Local URL: http://localhost:8501
  Network URL: http://192.168.229.40:8501

  For better performance, install the Watchdog module:

  $ xcode-select --install
  $ pip install watchdog
            
2024-05-27 12:40:38.263 Uncaught app exception
Traceback (most recent call last):
  File "***/AI-Powered-Resume-Analyzer-and-LinkedIn-Scraper-with-Selenium/venv/lib/python3.10/site-packages/langchain/_api/module_import.py", line 69, in import_by_name
    module = importlib.import_module(new_module)
  File "/Users/***/.pyenv/versions/3.10.4/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'langchain_community'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "***/AI-Powered-Resume-Analyzer-and-LinkedIn-Scraper-with-Selenium/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 600, in _run_script
    exec(code, module.__dict__)
  File "***/AI-Powered-Resume-Analyzer-and-LinkedIn-Scraper-with-Selenium/app.py", line 9, in <module>
    from langchain.embeddings.openai import OpenAIEmbeddings
  File "***/AI-Powered-Resume-Analyzer-and-LinkedIn-Scraper-with-Selenium/venv/lib/python3.10/site-packages/langchain/embeddings/openai.py", line 18, in __getattr__
    return _import_attribute(name)
  File "***/AI-Powered-Resume-Analyzer-and-LinkedIn-Scraper-with-Selenium/venv/lib/python3.10/site-packages/langchain/_api/module_import.py", line 72, in import_by_name
    raise ModuleNotFoundError(
ModuleNotFoundError: Module langchain_community.embeddings not found. Please install langchain-community to access this module. You can install it using `pip install -U langchain-community`
^C  Stopping...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant