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

Could not import ctransformers package. #8

Open
owencraston opened this issue Aug 30, 2023 · 5 comments
Open

Could not import ctransformers package. #8

owencraston opened this issue Aug 30, 2023 · 5 comments

Comments

@owencraston
Copy link

I am trying to run this project on a Macbook pro m1 and am getting the following stacktrace.

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/chainlit/utils.py", line 36, in wrapper
    return await user_function(**params_values)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/owencraston/src/personal/ai/demo/model.py", line 79, in start
    chain = qa_bot()
            ^^^^^^^^
  File "/Users/owencraston/src/personal/ai/demo/model.py", line 62, in qa_bot
    llm = load_llm()
          ^^^^^^^^^^
  File "/Users/owencraston/src/personal/ai/demo/model.py", line 46, in load_llm
    llm = CTransformers(
          ^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/langchain/load/serializable.py", line 74, in __init__
    super().__init__(**kwargs)
  File "pydantic/main.py", line 339, in pydantic.main.BaseModel.__init__
  File "pydantic/main.py", line 1102, in pydantic.main.validate_model
  File "/usr/local/lib/python3.11/site-packages/langchain/llms/ctransformers.py", line 67, in validate_environment
    raise ImportError(
ImportError: Could not import `ctransformers` package. Please install it with `pip install ctransformers`

I have of course ran pip install ctransformers

I am also using python 3.11. Does anyone know what the issue could be?

@owencraston owencraston changed the title Could not import ctransformers package. Please install it with pip install ctransformers Could not import ctransformers package. Aug 30, 2023
@oqp
Copy link

oqp commented Sep 10, 2023

Did you solve this? I have the same error but I'm using conda not pip

@ashusnapx
Copy link

rather than conda make a environment using python, in vs code or your IDE, and then run pip install ctransformers.
Thanks and close this issue.

@oqp
Copy link

oqp commented Sep 12, 2023 via email

@Ezyweb-uk
Copy link

I had the same error. I think I had installed 'transformers' as listed in the requirements. Once I had installed 'ctransformers' the error disappeared.

@tahairshad
Copy link

pip install langchain_community

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

5 participants