[英]docker ERROR: Could not find a version that satisfies the requirement apturl==0.5.2
I am using windows 10 OS.我正在使用 windows 10 操作系统。 I want to build an container based on linux so I can replicate code and dependencies developed from ubuntu.我想构建一个基于 linux 的容器,这样我就可以复制从 ubuntu 开发的代码和依赖项。 When I try to build it outputs Error message as above.当我尝试构建它时,会输出上述错误消息。
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. 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.
My dockerfile looks like this:我的 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 contains: 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
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.当我运行 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
删除并运行它会导致另一个错误. All error seem to be associated with ubuntu packages.所有错误似乎都与 ubuntu 包有关。
Am I not running a ubuntu container?我没有运行 ubuntu 容器吗? why aren't I allowed to install ubuntu packages?为什么我不允许安装 ubuntu 软件包?
Thanks!谢谢!
You try to install ubuntu packages with pip
(which is for python packages")您尝试使用pip
安装 ubuntu 包(用于 python 包)
try apt install -y apturl
If you want to install python packages write pip install package_name
尝试apt install -y apturl
如果你想安装 python 包,写pip install package_name
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.