我正在尝试Balena推送Dockerfile。对我的代码进行多次调整后,它仍然带有错误,无法推送。我的代码如下所示:
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"]
和错误:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-xtrlkujj/pyaudio/
最佳答案
尝试先运行:
pip3 --upgrade setuptools
以确保您具有Setuptools软件包中的最新版本。有时可以解决该问题。
如果pip需要安装工具才能正常工作。因此,如果没有它,则需要使用
apt-get install python3-setuptools
关于python -/tmp/pip-install-xtrlkujj/pyaudio/中的 “python setup.py egg_info”命令失败,错误代码为1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61515201/