![](/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.