I am trying to balena push a Dockerfile. After several adjustments of my code, it still comes with error and unable to be pushed. My code is shown:
FROM balenalib/fincm3-debian-python:latest
# RUN install_packages git
RUN apt-get update
RUN apt-get install python -y
&& apt-get install python3-pip -y
RUN apt-get install libportaudio0 libportaudio2 libportaudiocpp0 portaudio19-dev -y
RUN pip3 install pyaudio numpy matplotlib
scipy librosa
# Set our working directory
WORKDIR /usr/src/app
COPY Recorder.py /usr/src/app
# Recorder.py will run when the container starts up on the device
CMD ["python","/usr/src/app/Recorder.py"]
And the error :
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-xtrlkujj/pyaudio/
2
Answers
Try run first:
to make sure you have the recent version from the Setuptools package. That sometimes fixes that problem.
And if pip needs setup tools to work. So if you don’t have it you need to install it with
Then I use this from this web