无法在ubuntu 18.04 docker/bin/sh中安装pip:1:pip:找不到 [英] cant install pip in ubuntu 18.04 docker /bin/sh: 1: pip: not found
本文介绍了无法在ubuntu 18.04 docker/bin/sh中安装pip:1:pip:找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在docker映像中使用pip出现错误.
从FROM版本:18.04运行apt-get update&&&apt-get install -y \常用软件属性运行add-apt-repository Universe运行apt-get install -y \python3.6 \python3-pipENV PYTHONUNFFERFERED 1运行mkdir/apiWORKDIR/api复制 ./api/运行pip install pipenv运行ls运行pipenv同步
我安装了python 3.6和pip3,但得到
第9/11步:运行pip install pipenv--->在b184de4eb28e中运行/bin/sh:1:点子:找不到
解决方案
要为python3运行 pip
,请使用 pip3
,而不是 pip
./p>
I am getting the error using pip in my docker image.
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y \
software-properties-common
RUN add-apt-repository universe
RUN apt-get install -y \
python3.6 \
python3-pip
ENV PYTHONUNBUFFERED 1
RUN mkdir /api
WORKDIR /api
COPY . /api/
RUN pip install pipenv
RUN ls
RUN pipenv sync
I installed python 3.6 and pip3 but getting
Step 9/11 : RUN pip install pipenv
---> Running in b184de4eb28e
/bin/sh: 1: pip: not found
解决方案
To run pip
for python3 use pip3
, not pip
.
这篇关于无法在ubuntu 18.04 docker/bin/sh中安装pip:1:pip:找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文