在我的 docker 镜像中使用 pip 时出现错误。
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
我安装了 python 3.6 和 pip3 但得到了
Step 9/11 : RUN pip install pipenv
---> Running in b184de4eb28e
/bin/sh: 1: pip: not found
最佳答案
要为 python3 运行 pip
,请使用 pip3
,而不是 pip
。
关于python - 无法在 ubuntu 18.04 docker/bin/sh : 1: pip: not found 中安装 pip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60435261/