![](/img/trans.png)
[英]could not find a version that satisfies the requirement symforce>=0.5.0
[英]docker ERROR: Could not find a version that satisfies the requirement apturl==0.5.2
我正在使用 windows 10 操作系统。 我想构建一个基于 linux 的容器,这样我就可以复制从 ubuntu 开发的代码和依赖项。 当我尝试构建它时,会输出上述错误消息。
From my understanding docker for desktop runs linux OS kernel under-the-hood therefore allowing window users to run linux based containers, not sure why it is outputting this error.
我的 dockerfile 看起来像这样:
FROM ubuntu:18.04
ENV PATH="/root/miniconda3/bin:${PATH}"
ARG PATH="/root/miniconda3/bin:${PATH}"
RUN apt update \
&& apt install -y htop python3-dev wget
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& mkdir root/.conda \
&& sh Miniconda3-latest-Linux-x86_64.sh -b \
&& rm -f Miniconda3-latest-Linux-x86_64.sh
RUN conda create -y -n ml python=3.7
COPY . src/
RUN /bin/bash -c "cd src \
&& source activate ml \
&& pip install -r requirements.txt"
requirements.txt 包含:
apturl==0.5.2
asn1crypto==0.24.0
bleach==2.1.2
Brlapi==0.6.6
certifi==2020.11.8
chardet==3.0.4
click==7.1.2
command-not-found==0.3
configparser==5.0.1
cryptography==2.1.4
cupshelpers==1.0
dataclasses==0.7
当我运行 docker 构建命令时,它输出: 1.649 ERROR: Could not find a version that satisfies the requirement apturl==0.5.2 1.649 ERROR: No matching distribution found for apturl==0.5.2
删除并运行它会导致另一个错误. 所有错误似乎都与 ubuntu 包有关。
我没有运行 ubuntu 容器吗? 为什么我不允许安装 ubuntu 软件包?
谢谢!
您尝试使用pip
安装 ubuntu 包(用于 python 包)
尝试apt install -y apturl
如果你想安装 python 包,写pip install package_name
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.