docker错误:找不到满足apturl == 0.5.2要求的版本 [英] docker ERROR: Could not find a version that satisfies the requirement apturl==0.5.2

查看:540
本文介绍了docker错误:找不到满足apturl == 0.5.2要求的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Windows 10操作系统.我想构建一个基于linux的容器,以便可以复制从ubuntu开发的代码和依赖项.当我尝试构建时,会输出上述错误消息.

I am using windows 10 OS. I want to build an container based on linux so I can replicate code and dependencies developed from ubuntu. When I try to build it outputs Error message as above.

据我了解,桌面版docker在后台运行linux OS内核,因此允许窗口用户运行基于linux的容器,不确定为什么会输出此错误.

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看起来像这样:

My dockerfile looks like this:

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包含:

requirements.txt contains:

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 build命令时,它输出: 1.649错误:找不到满足apturl == 0.5.2要求的版本1.649错误:找不到与apturl == 0.5.2匹配的分发版本删除并运行它会导致另一个错误.所有错误似乎都与ubuntu软件包有关.

When I run docker build command it outputs: 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 Deleting it and running it lead to another error. All error seem to be associated with ubuntu packages.

我没有运行ubuntu容器吗?为什么我不允许安装ubuntu软件包?

Am I not running a ubuntu container? why aren't I allowed to install ubuntu packages?

谢谢!

推荐答案

您尝试使用 pip (适用于python软件包)安装ubuntu软件包

You try to install ubuntu packages with pip (which is for python packages")

尝试 apt install -y apturl 如果要安装python软件包,请编写 pip install package_name

try apt install -y apturl If you want to install python packages write pip install package_name

这篇关于docker错误:找不到满足apturl == 0.5.2要求的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆