BirdNET-Analyzer icon indicating copy to clipboard operation
BirdNET-Analyzer copied to clipboard

Error running birdnet_analyzer.embeddings from CLI on Windows. Is it possible to clarify the documentation?

Open cbalantic opened this issue 8 months ago • 3 comments

I'm attempting to generate embeddings from CLI on Windows 11 for BirdNET v1.5.1 using Python 3.11. In my initial tinkering attempts with birdnet_analyzer.embeddings, I consistently get the error:

ModuleNotFoundError: No module named 'perch_hoplite'

Additionally, it's not clear from the current documentation what the -db, --database argument means. I'm guessing I need to install perch_hoplite, which appears to include a db component that assists with managing the embeddings and the metadata.

I did a simple install of perch-hoplite into my conda environment for BirdNET and it appears to have installed, though it does give:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow-intel 2.15.1 requires protobuf!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5,<5.0.0dev,>=3.20.3, but you have protobuf 6.31.0rc1 which is incompatible.

Now when I attempt to run birdnet_analyzer.embeddings from CLI, things are happening, but it ultimately ends with errors. I end up with a large output that includes issues related to tensorflow:

ModuleNotFoundError: No module named 'tflite_runtime'

Though perhaps the issue is also related to IT firewalls etc on my workstation:

[SSL: CERTIFICATE_VERIFY_FAILED]

I can provide more error info if needed, but before I go into more involved debugging, I'm wondering if it would be possible to add the following details to the BirdNET documentation for birdnet_analyzer.embeddings: that perch_hoplite is required, any associated details around it's version and dependencies and installation tips, and a brief explanation of the -db argument. Thank you for considering!

cbalantic avatar Apr 18 '25 18:04 cbalantic

perch hoplite is now listed as a dependency, use pip install .[all] to install all dependencies. We are currently working on the documentation, which will be updated in the comming weeks

Josef-Haupt avatar Apr 24 '25 08:04 Josef-Haupt

Just adding a +1 here, I am on a MacOS and am having the same issue. I can't get the example embeddings function to run after installing perch hoplite, and it appears to be an issue with the --database argument. Here is part of the error: "ValueError: No usearch config found in DB and none provided."

DenaJGibbon avatar Apr 28 '25 14:04 DenaJGibbon

@DenaJGibbon We kind of restructured the embedding extraction process and what you are describing should be fixed now, please get back to us if you encounter more problems

Josef-Haupt avatar Sep 09 '25 10:09 Josef-Haupt