gunshot_detection
gunshot_detection copied to clipboard
Problem when installing dependencies from requirements.txt
Hi, I created a virtual environment (with venv
and Python 3.9.2
) to execute your raspberry_pi/gunshot_detection.py
file because I'm interesting on using it in a Raspberry Pi 3B+. First, I tried to install the dependencies from your requirements.txt
file, but I have the following error as a result:
WARNING: Discarding https://files.pythonhosted.org/packages/cb/97/361c8c6ceb3eb765371a702ea873ff2fe112fa40073e7d2b8199db8eb56e/scipy-1.3.0.tar.gz#sha256=c3bb4bd2aca82fb498247deeac12265921fe231502a6bc6edea3ee7fe6c40a7a (from https://pypi.org/simple/scipy/) (requires-python:>=3.5). Command errored out with exit status 1: /home/pi/python-venv/py-audio/bin/python /home/pi/python-venv/py-audio/lib/python3.9/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-swbwcxty/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --extra-index-url https://www.piwheels.org/simple -- wheel setuptools 'Cython>=0.29.2' 'numpy==1.13.3; python_version=='"'"'3.5'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"'' Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement scipy==1.3.0
ERROR: No matching distribution found for scipy==1.3.0
I don't know the reason, maybe it is the Python version that I'm using. If that is the case, could you recommend me a version that actually works? Also, it seams to be a problem with spicy and numpy, but I'm not sure. The process took too much time to install spicy and then the problem appeared. And I tried to re-run the installation process after rebooting the Raspberry, but the same problem occurred.
Thanks, Javier.
I upgraded the version of pip with pip install --upgrade pip
and I still received a similar error.
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [4884 lines of output]
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple, https://www.piwheels.org/simple
Ignoring numpy: markers 'python_version == "3.5"' don't match your environment
Ignoring numpy: markers 'python_version == "3.6"' don't match your environment
note: This error originates from a subprocess, and is likely not a problem with pip.
The error message indicates that pip is not the problem, so I will try to create new environments with previous Python versions.
Hi, @javimarsal.
I have not personally tested our pipeline with newer versions of scipy
, however, I believe it should be safe for you to install the closest (newer) version of scipy
(e.g., scipy==1.4.0
) instead. Since I do not have personal access to our hardware for this pipeline (at the moment), I sadly cannot personally debug these package versions for you.
Let me know if this fixes the issue for you.
Best, Alex