python - 命令“python setup.py egg_info”在 /tmp/pip-install-xtrlkujj/pyaudio/ 中失败,错误代码为 1
问题描述
我正在尝试 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 install --upgrade setuptools
以确保您拥有 Setuptools 包中的最新版本。这有时可以解决这个问题。
如果 pip 需要设置工具才能工作。所以如果你没有它,你需要安装它
apt-get install python3-setuptools
推荐阅读
- python - 使用分类列值更改线条的颜色
- sql - sql转换为mongodb聚合
- sql - BigQuery SQL 将开始日期和结束日期更改为月份组
- ssl - Kafka Security 实施问题 SASL SSL 和 SCRAM
- python - 术语文档稀疏矩阵新
- python - 类型错误:do_search() 缺少 2 个必需的位置参数:“短语”和“字母”
- python - 安装 TensorFlow 错误:ProtocolError 和 WinError 10054
- powerbi - 选定日期之前的 Power BI Max 分组依据
- python - 从 Python 3.8 访问 Twitch API 时出现错误 400 Bad Request
- excel - 使用 For 循环打开 Excel 文件时遇到问题