[Python] Attempting to import sentence_transformers throws `AttributeError: readonly attribute`

Discussão em 'Python' iniciado por Stack, Fevereiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    When attempting to import sentence_transformers I get this error:

    AttributeError: readonly attribute


    I'm running Python 3.12.9 in VS Code. I've tried uninstalling and reinstalling sentence_transformers to no avail. I've also tried installing an earlier version, but I get the same error.

    I've also tried the conda route -- conda install conda-forge::sentence-transformers -- but that gives me a dependency issue:

    RemoveError: 'tqdm' is a dependency of conda and cannot be removed from conda's operating environment.


    Would be grateful for any solution that lets me install this dang package. Thanks!

    Continue reading...

Compartilhe esta Página