BirdVox / birdvoxdetect

A pre-trained deep learning system for detecting bird flight calls in continuous recordings
MIT License
76 stars 15 forks source link

Unable to find executable #97

Closed RichardLitt closed 2 years ago

RichardLitt commented 2 years ago

Hey there! Thanks for this project.

I'm trying to install it, and I'm having some issues. birdvoxdetect isn't available on the commandline, when I install using pip. What am I missing?

Last login: Sun Mar  6 08:38:14 on ttys002
➜  ~ pip -V
pip 22.0.3 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
➜  ~ pip install birdvoxdetect
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: birdvoxdetect in ./Library/Python/3.7/lib/python/site-packages (0.5.1)
Requirement already satisfied: pandas==0.25.1 in ./Library/Python/3.7/lib/python/site-packages (from birdvoxdetect) (0.25.1)
Requirement already satisfied: scikit-learn==0.21.2 in ./Library/Python/3.7/lib/python/site-packages (from birdvoxdetect) (0.21.2)
Requirement already satisfied: numba==0.48.0 in ./Library/Python/3.7/lib/python/site-packages (from birdvoxdetect) (0.48.0)
Requirement already satisfied: numpy==1.16.4 in ./Library/Python/3.7/lib/python/site-packages (from birdvoxdetect) (1.16.4)
Requirement already satisfied: birdvoxclassify>=0.2 in ./Library/Python/3.7/lib/python/site-packages (from birdvoxdetect) (0.2.0)
Requirement already satisfied: h5py<3.0.0,>=2.7.0 in ./Library/Python/3.7/lib/python/site-packages (from birdvoxdetect) (2.10.0)
Requirement already satisfied: tensorflow>=2.2 in ./Library/Python/3.7/lib/python/site-packages (from birdvoxdetect) (2.3.4)
Requirement already satisfied: librosa==0.7.0 in ./Library/Python/3.7/lib/python/site-packages (from birdvoxdetect) (0.7.0)
Requirement already satisfied: resampy>=0.2.0 in ./Library/Python/3.7/lib/python/site-packages (from librosa==0.7.0->birdvoxdetect) (0.2.2)
Requirement already satisfied: joblib>=0.12 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa==0.7.0->birdvoxdetect) (1.0.1)
Requirement already satisfied: decorator>=3.0.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa==0.7.0->birdvoxdetect) (4.4.2)
Requirement already satisfied: six>=1.3 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from librosa==0.7.0->birdvoxdetect) (1.13.0)
Requirement already satisfied: soundfile>=0.9.0 in ./Library/Python/3.7/lib/python/site-packages (from librosa==0.7.0->birdvoxdetect) (0.10.3.post1)
Requirement already satisfied: audioread>=2.0.0 in ./Library/Python/3.7/lib/python/site-packages (from librosa==0.7.0->birdvoxdetect) (2.1.9)
Requirement already satisfied: scipy>=1.0.0 in ./Library/Python/3.7/lib/python/site-packages (from librosa==0.7.0->birdvoxdetect) (1.5.4)
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from numba==0.48.0->birdvoxdetect) (47.1.0)
Requirement already satisfied: llvmlite<0.32.0,>=0.31.0dev0 in ./Library/Python/3.7/lib/python/site-packages (from numba==0.48.0->birdvoxdetect) (0.31.0)
Requirement already satisfied: pytz>=2017.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pandas==0.25.1->birdvoxdetect) (2021.1)
Requirement already satisfied: python-dateutil>=2.6.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pandas==0.25.1->birdvoxdetect) (2.8.1)
Requirement already satisfied: PySoundFile>=0.9.0 in ./Library/Python/3.7/lib/python/site-packages (from birdvoxclassify>=0.2->birdvoxdetect) (0.9.0.post1)
Requirement already satisfied: wheel>=0.26 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from tensorflow>=2.2->birdvoxdetect) (0.36.2)
Requirement already satisfied: grpcio>=1.8.6 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (1.41.1)
Requirement already satisfied: wrapt>=1.11.1 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (1.13.3)
Requirement already satisfied: absl-py>=0.7.0 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (0.15.0)
Requirement already satisfied: protobuf>=3.9.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from tensorflow>=2.2->birdvoxdetect) (3.14.0)
Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (2.3.0)
Requirement already satisfied: google-pasta>=0.1.8 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (0.2.0)
Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (1.1.2)
Requirement already satisfied: astunparse==1.6.3 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (1.6.3)
Requirement already satisfied: gast==0.3.3 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (0.3.3)
Requirement already satisfied: opt-einsum>=2.3.2 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (3.3.0)
Requirement already satisfied: tensorboard<3,>=2.3.0 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (2.7.0)
Requirement already satisfied: termcolor>=1.1.0 in ./Library/Python/3.7/lib/python/site-packages (from tensorflow>=2.2->birdvoxdetect) (1.1.0)
Requirement already satisfied: cffi>=0.6 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from PySoundFile>=0.9.0->birdvoxclassify>=0.2->birdvoxdetect) (1.14.5)
Requirement already satisfied: requests<3,>=2.21.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (2.22.0)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in ./Library/Python/3.7/lib/python/site-packages (from tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (0.6.1)
Requirement already satisfied: werkzeug>=0.11.15 in ./Library/Python/3.7/lib/python/site-packages (from tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (2.0.2)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in ./Library/Python/3.7/lib/python/site-packages (from tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (1.8.0)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in ./Library/Python/3.7/lib/python/site-packages (from tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (0.4.6)
Requirement already satisfied: google-auth<3,>=1.6.3 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (1.26.1)
Requirement already satisfied: markdown>=2.6.8 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (3.3.4)
Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from cffi>=0.6->PySoundFile>=0.9.0->birdvoxclassify>=0.2->birdvoxdetect) (2.20)
Requirement already satisfied: rsa<5,>=3.1.4 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (4.7)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (0.2.8)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from google-auth<3,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (4.2.1)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (1.3.0)
Requirement already satisfied: importlib-metadata in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (3.4.0)
Requirement already satisfied: idna<2.9,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (1.25.11)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (2021.10.8)
Requirement already satisfied: pyasn1<0.5.0,>=0.4.6 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (0.4.8)
Requirement already satisfied: oauthlib>=3.0.0 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (3.1.0)
Requirement already satisfied: zipp>=0.5 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from importlib-metadata->markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (3.4.0)
Requirement already satisfied: typing-extensions>=3.6.4 in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (from importlib-metadata->markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow>=2.2->birdvoxdetect) (3.7.4.3)
➜  ~ birdvoxdetect
zsh: command not found: birdvoxdetect
RichardLitt commented 2 years ago

I've also tried installing birdvoxdetect in other ways, but have not succeeded. The closest I got was using python3.9 setup.py install, which isn't documented, but that fails due to dependency issues with numpy, sci-kit, cython, and others. I've been trying to do this within a conda instance, and that doesn't seem to help.

If there could be alternative installation instructions, I would appreciate it.

RichardLitt commented 2 years ago

Looks like pip was saving to a folder that wasn't in my PATH. Not sure this is a project-issue, but I wonder if there is a way I could improve the docs to help other people not have this issue again?

lostanlen commented 2 years ago

hello @RichardLitt ,

can you try this?

alias birdvoxdetect="python3 -m /path/to/birdvoxdetect/birdvoxdetect"

where /path/to/birdvoxdetect/birdvoxdetect points to the folder in which __init__.py lives.

The alternative is to run it in Python. import birdvoxdetect followed by birdvoxetect.proces_file( ... See prototype here: https://github.com/BirdVox/birdvoxdetect/blob/master/birdvoxdetect/core.py#L49

RichardLitt commented 2 years ago

I got it working. I think adding where it was to the PATH is a more universal way of dealing with the support issue I had, and on second thought, I don't think that needs to be in the docs here. Aliasing is a good idea, however.

Thanks for holding space for debugging!