我可以使用一个Docker运行命令安装apt软件包,如下所示:
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
build-essential \
zlib1g-dev \
glade \
python3-dev \
python3-pip \
python3-setuptools \
pkg-config \
libglib2.0-dev \
libgirepository1.0-dev \
libcairo2-dev \
gir1.2-gtk-3.0 \ 但是,我不能在Docker RUN命令中使用Python执行相同的操作,例如:
RUN pip3 install \
wheel \
pycairo \
PyGObject \
requests \
pyinstaller以错误结尾:
Collecting pyinstaller (from -r /tmp/requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/b0/e6/e5760666896739115b0e4538a42cdd895215581618ec885ad043dd35ee57/pyinstaller-4.10.tar.gz (2.7MB)
Complete output from command python setup.py egg_info:
Error: Building wheels requires the 'wheel' package. Please `pip install wheel` then try again.为什么?
尽管我能做到:
RUN pip3 install wheel
RUN pip3 install pycairo
RUN pip3 install PyGObject
RUN pip3 install requests
RUN pip3 install pyinstaller 仍然希望理解为什么不能在一个Docker运行pip命令中完成
发布于 2022-10-29 15:59:19
组合安装的问题
RUN pip3 install \
wheel \
pycairo \
PyGObject \
requests \
pyinstallerpip在处理所有列出的软件包之前不会完全安装软件包,而且有些软件包要求wheel已经完全安装。首先分别安装wheel,然后再安装其他所有内容:
RUN pip3 install wheel
RUN pip3 install \
pycairo \
PyGObject \
requests \
pyinstallerwheel是一个特殊的软件包--它需要安装其他软件包。
https://stackoverflow.com/questions/74246658
复制相似问题