opendevops-cn / opendevops

CODO是一款为用户提供企业多混合云、全球一站式DevOps、自动化运维、完全开源的云管理平台、自动化运维平台
http://www.opendevops.cn/
GNU General Public License v3.0
3.82k stars 1.03k forks source link

Docker Bulid 安装依赖失败问题The command '/bin/sh -c pip3 install --upgrade pip' returned a non-zero code: 1 #3

Open yanghongfei opened 5 years ago

yanghongfei commented 5 years ago

错误信息: Step 10/16 : RUN pip3 install --upgrade pip ---> Running in 83716c526776

Collecting pip Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB) Installing collected packages: pip Found existing installation: pip 10.0.1 Uninstalling pip-10.0.1: Successfully uninstalled pip-10.0.1 Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/tmp/pip-uninstall-y8n2hlf9/usr/local/bin/pip3'

The command '/bin/sh -c pip3 install --upgrade pip' returned a non-zero code: 1

碰到以上这个问题,报错没有文件目录,因为系统差异,有些Dockerfile里面需要pip3 install --user才可以安装依赖,有些不需要,报错的同学请自行修改Dockerfile里面pip3 install 加上 --user参数即可;

yanghongfei commented 5 years ago

修改Dockerfile, 加上--user参数, pip3 install --user --upgrade pip