- Python 3.10 (3.11 might work, have not tested. 3.9 does not work.)
- The easiest way to install this is using Homebrew. If you do not have Homebrew installed, you will need to install that.
- The BirdNET Analyzer repository.
- You can clone it from https://github.com/kahst/BirdNET-Analyzer/ if you have git, or download a zipped image.
You need to determine which version(s) of python you have installed. Open a terminal, and try these commands:
python --version
python3 --version
python3.10 --version
If any of them return 'Python 3.10.14', then use that command to create your virtual environment.
If none of them do (you get 'command not found') then you need to install Python 3.10.
My preferred method is using Homebrew https://brew.sh/.
Open a terminal and run
brew --version
If you get 'command not found' you need to install Homebrew. If not, skip to Install Python
You will need administrator privledges to run this. If your IT department requires you to do something to get Admin access, do that first.
Open a terminal and run
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If you are asked for a password enter the password you use to log in to your computer.
In the terminal, run
brew install python@3.10
If you want to clone the repository from GitHub, install Git:
brew install git
In the terminal, navigate to where you want the folder (cd ~/Documents
) and run:
git clone https://github.com/kahst/BirdNET-Analyzer.git
This will always get the latest version.
Or download a zip from https://github.com/kahst/BirdNET-Analyzer and unzip it.
Now navigate to that folder in the terminal. E.g., cd ~/Documents/BirdNET-Analyzer
, or wherever you put it.
We need to create a virtual environment and add dependencies to it.
In this step, if python3.10
is not the command to run Python 3.10, replace it with the appropriate command for your computer.
Create the environment:
python3.10 -m venv venv-birdnet
Now we need to activate the environment we just created.
source venv-birdnet/bin/activate
After doing this, you should see (venv-birdnet) before your command prompt.
user@MyMac BirdNET-Analyzer % source venv-birdnet/bin/activate
(venv-birdnet) user@MyMac BirdNET-Analyzer %
All of the following commands should be entered while in the virtual environment.
If you close the terminal window, you will need to re-activate the virtual environment by navigating back to this folder, cd ~/Documents/BirdNET-Analyzer
and then source venv-birdnet/bin/activate
.
Since we are in the virtual environment and it was created using Python 3.10, we just need to use python
instead of python3.10
for the command.
python -m pip install -U pip
These can be done all at once, or one at a time.
python -m pip install tensorflow==2.15.1 keras-tuner tensorflow-metal librosa resampy
-or-
python -m pip install tensorflow==2.15.1
python -m pip install keras-tuner
python -m pip install tensorflow-metal
python -m pip install librosa
python -m pip install resampy
python -m pip install pywebview gradio
python gui.py
To exit the virtual environment, use
deactivate
or just close the terminal window.
Next time you want to run the GUI, you just need to navigate to the /BirdNET-Analyzer folder and run
source venv-birdnet/bin/activate
python gui.py
If you are working with conda, I recommend :
conda create --name venv-birdnet python=3.10
in the directory where you have downloaded, then continue with Install dependencies