默认镜像自带的python版本过低,dockerfile升级python3.7.4版本,后版本没生效,多版本python3,指定python版本安装包
一定要先把直接的链接删除RUN rm -rf /usr/local/bin/python3 && rm -rf /usr/bin/python3建立新的链接新的才会生效RUN ln -sf /usr/local/bin/python3.7 /usr/local/bin/python3 && ln -sf /usr/local/bin/python3.7 /usr/b
·
一定要先把直接的链接删除
RUN rm -rf /usr/local/bin/python3 && rm -rf /usr/bin/python3
建立新的链接新的才会生效
RUN ln -sf /usr/local/bin/python3.7 /usr/local/bin/python3 && ln -sf /usr/local/bin/python3.7 /usr/bin/python3 && ln -sf /usr/local/bin/pip3.7 /usr/local/bin/pip3 && ln -sf /usr/local/bin/pip3.7 /usr/bin/pip3
指定python3.7的软件安装python包,前面加python3.7 -m
python3.7 -m pip install xx
&& python3.7 -m pip install --upgrade setuptools \
&& python3.7 -m pip install --upgrade pip \
&& python3.7 -m pip install -r requirements.txt \
&& python3.7 -m pip install paddlepaddle_gpu-2.2.2.post101-cp37-cp37m-linux_x86_64.whl \
更多推荐
已为社区贡献4条内容
所有评论(0)