由于 cython 依赖,无法在 dind 18.09.6-dind 上使用 pip 安装 awscli

如何解决由于 cython 依赖,无法在 dind 18.09.6-dind 上使用 pip 安装 awscli

昨天大部分时间我都看到一个奇怪的问题,当运行一个简单的 jenkins 构建时,该构建使用容器 docker:18.09.6-dind (alpine linux) 的 pod 模板,尝试使用 pip 安装 awscli 时构建会失败。这是示例代码:-

apk add curl
apk add py-pip
pip install --user awscli

错误是:-

apk add py-pip
(1/11) Installing libbz2 (1.0.6-r7)
(2/11) Installing expat (2.2.8-r0)
(3/11) Installing libffi (3.2.1-r6)
(4/11) Installing gdbm (1.13-r1)
(5/11) Installing ncurses-terminfo-base (6.1_p20190518-r2)
(6/11) Installing ncurses-libs (6.1_p20190518-r2)
(7/11) Installing readline (8.0.0-r0)
(8/11) Installing sqlite-libs (3.28.0-r3)
(9/11) Installing python2 (2.7.18-r0)
(10/11) Installing py-setuptools (40.8.0-r1)
(11/11) Installing py2-pip (18.1-r0)
Executing busybox-1.30.1-r2.trigger
OK: 74 MiB in 54 packages
[Pipeline] withAwsCli
Executing sh script inside container dind of pod pod-custom-w741q
Executing command: "pip" "--version" 
exit
pip 18.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
Executing sh script inside container dind of pod pod-custom-w741q
Executing command: "pip" "show" "awscli" 
exit
ERROR: [withAwsCli] Command 'pip show awscli' returned the code 1
Executing sh script inside container dind of pod pod-custom-w741q
Executing command: "pip" "install" "--user" "awscli" 
exit
Collecting awscli
  Downloading https://files.pythonhosted.org/packages/d9/d3/1b76aa71fea8438f82a991ad94443d343836848f8b8c0dc413ed987745f8/awscli-1.19.51-py2.py3-none-any.whl (3.6MB)
Collecting botocore==1.20.51 (from awscli)
  Downloading https://files.pythonhosted.org/packages/3c/1d/7a3741f17a10cc599bb3728351992b10094328ee07b8a129250ba2039642/botocore-1.20.51-py2.py3-none-any.whl (7.4MB)
Collecting colorama<0.4.4,>=0.2.5 (from awscli)
  Downloading https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl
Collecting PyYAML<5.5,>=3.10 (from awscli)
  Downloading https://files.pythonhosted.org/packages/a0/a4/d63f2d7597e1a4b55aa3b4d6c5b029991d3b824b5bd331af8d4ab1ed687d/PyYAML-5.4.1.tar.gz (175kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  Complete output from command /usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-mT9r0n --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Cython:
  Collecting setuptools
    Downloading https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl (583kB)
  Collecting wheel
    Downloading https://files.pythonhosted.org/packages/65/63/39d04c74222770ed1589c0eaba06c05891801219272420b40311cd60c880/wheel-0.36.2-py2.py3-none-any.whl
  Collecting Cython
    Downloading https://files.pythonhosted.org/packages/d9/cd/0d2d90b27219c07f68f1c25bcc7b02dd27639d2180add9d4b73e70945869/Cython-0.29.23.tar.gz (2.1MB)
  Installing collected packages: setuptools,wheel,Cython
    Running setup.py install for Cython: started
      Running setup.py install for Cython: finished with status 'error'
      Complete output from command /usr/bin/python2 -u -c "import setuptools,tokenize;__file__='/tmp/pip-install-72Od1r/Cython/setup.py';f=getattr(tokenize,'open',open)(__file__);code=f.read().replace('\r\n','\n');f.close();exec(compile(code,__file__,'exec'))" install --record /tmp/pip-record-Qfbz7l/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-mT9r0n --compile:
      Unable to find pgen,not compiling formal grammar.
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-2.7
      copying cython.py -> build/lib.linux-x86_64-2.7
      creating build/lib.linux-x86_64-2.7/Cython
      copying Cython/TestUtils.py -> build/lib.linux-x86_64-2.7/Cython
      copying Cython/Utils.py -> build/lib.linux-x86_64-2.7/Cython
      copying Cython/CodeWriter.py -> build/lib.linux-x86_64-2.7/Cython
      copying Cython/Debugging.py -> build/lib.linux-x86_64-2.7/Cython
      copying Cython/StringIOTree.py -> build/lib.linux-x86_64-2.7/Cython
      copying Cython/__init__.py -> build/lib.linux-x86_64-2.7/Cython
      copying Cython/Coverage.py -> build/lib.linux-x86_64-2.7/Cython
      copying Cython/Shadow.py -> build/lib.linux-x86_64-2.7/Cython
      creating build/lib.linux-x86_64-2.7/Cython/Build
      copying Cython/Build/Dependencies.py -> build/lib.linux-x86_64-2.7/Cython/Build
      copying Cython/Build/__init__.py -> build/lib.linux-x86_64-2.7/Cython/Build
      copying Cython/Build/Distutils.py -> build/lib.linux-x86_64-2.7/Cython/Build
      copying Cython/Build/Inline.py -> build/lib.linux-x86_64-2.7/Cython/Build
      copying Cython/Build/BuildExecutable.py -> build/lib.linux-x86_64-2.7/Cython/Build
      copying Cython/Build/Cythonize.py -> build/lib.linux-x86_64-2.7/Cython/Build
      copying Cython/Build/IpythonMagic.py -> build/lib.linux-x86_64-2.7/Cython/Build
      creating build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/FlowControl.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Code.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/MemoryView.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Pipeline.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/AnalysedTreeTransforms.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/CythonScope.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/TypeSlots.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Errors.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/FusedNode.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/PyrexTypes.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/AutoDocTransforms.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/UtilityCode.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/StringEncoding.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Version.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/CmdLine.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/UtilNodes.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/ParseTreeTransforms.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Visitor.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/TypeInference.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/__init__.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Options.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/DebugFlags.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Scanning.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/ExprNodes.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Interpreter.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Builtin.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Annotate.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Symtab.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Optimize.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Parsing.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Naming.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/ModuleNode.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/TreeFragment.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Nodes.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Future.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/TreePath.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Main.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/CodeGeneration.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Buffer.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Pythran.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      copying Cython/Compiler/Lexicon.py -> build/lib.linux-x86_64-2.7/Cython/Compiler
      creating build/lib.linux-x86_64-2.7/Cython/Runtime
      copying Cython/Runtime/__init__.py -> build/lib.linux-x86_64-2.7/Cython/Runtime
      creating build/lib.linux-x86_64-2.7/Cython/Distutils
      copying Cython/Distutils/old_build_ext.py -> build/lib.linux-x86_64-2.7/Cython/Distutils
      copying Cython/Distutils/__init__.py -> build/lib.linux-x86_64-2.7/Cython/Distutils
      copying Cython/Distutils/build_ext.py -> build/lib.linux-x86_64-2.7/Cython/Distutils
      copying Cython/Distutils/extension.py -> build/lib.linux-x86_64-2.7/Cython/Distutils
      creating build/lib.linux-x86_64-2.7/Cython/Debugger
      copying Cython/Debugger/DebugWriter.py -> build/lib.linux-x86_64-2.7/Cython/Debugger
      copying Cython/Debugger/libpython.py -> build/lib.linux-x86_64-2.7/Cython/Debugger
      copying Cython/Debugger/__init__.py -> build/lib.linux-x86_64-2.7/Cython/Debugger
      copying Cython/Debugger/Cygdb.py -> build/lib.linux-x86_64-2.7/Cython/Debugger
      copying Cython/Debugger/libcython.py -> build/lib.linux-x86_64-2.7/Cython/Debugger
      creating build/lib.linux-x86_64-2.7/Cython/Debugger/Tests
......................................
......................................
      running build_ext
      building 'Cython.Plex.Scanners' extension
      creating build/temp.linux-x86_64-2.7
      creating build/temp.linux-x86_64-2.7/tmp
      creating build/temp.linux-x86_64-2.7/tmp/pip-install-72Od1r
      creating build/temp.linux-x86_64-2.7/tmp/pip-install-72Od1r/Cython
      creating build/temp.linux-x86_64-2.7/tmp/pip-install-72Od1r/Cython/Cython
      creating build/temp.linux-x86_64-2.7/tmp/pip-install-72Od1r/Cython/Cython/Plex
      gcc -fno-strict-aliasing -Os -fomit-frame-pointer -g -DNDEBUG -Os -fomit-frame-pointer -g -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/python2.7 -c /tmp/pip-install-72Od1r/Cython/Cython/Plex/Scanners.c -o build/temp.linux-x86_64-2.7/tmp/pip-install-72Od1r/Cython/Cython/Plex/Scanners.o
      unable to execute 'gcc': No such file or directory
      error: command 'gcc' failed with exit status 1
  
      ----------------------------------------
  Command "/usr/bin/python2 -u -c "import setuptools,'exec'))" install --record /tmp/pip-record-Qfbz7l/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-mT9r0n --compile" failed with error code 1 in /tmp/pip-install-72Od1r/Cython/
  
  ----------------------------------------
Command "/usr/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-mT9r0n --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Cython" failed with error code 1 in None

直到昨天它一直运行良好,现在在同一个 dind 操作系统上也运行良好。我不知道为什么它昨天才尝试设置依赖项 cython。我看到昨天发布了新版本的 cython https://pypi.org/search/?q=cython 不确定这是否起到了任何作用 我不太熟悉 pip 在尝试安装某些东西时是如何工作的,所以想了解为什么它突然寻找 cython 而它在该 dind 操作系统上的相同 pip 版本 18.1 并试图获取最新的 awscli根据昨天 1.19.51 发布 https://github.com/aws/aws-cli/releases 昨天同样的事情在 docker:18.06.1-ce-dind 或其他 dind 版本上运行得很好。所以特定于 docker:18.09.6-dind 以及 pip 18.1 和 awscli 1.19.51 的组合。 请帮我弄清楚这里可能是什么问题。

解决方法

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


依赖报错 idea导入项目后依赖报错,解决方案:https://blog.csdn.net/weixin_42420249/article/details/81191861 依赖版本报错:更换其他版本 无法下载依赖可参考:https://blog.csdn.net/weixin_42628809/a
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下 2021-12-03 13:33:33.927 ERROR 7228 [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPL
错误1:gradle项目控制台输出为乱码 # 解决方案:https://blog.csdn.net/weixin_43501566/article/details/112482302 # 在gradle-wrapper.properties 添加以下内容 org.gradle.jvmargs=-Df
错误还原:在查询的过程中,传入的workType为0时,该条件不起作用 &lt;select id=&quot;xxx&quot;&gt; SELECT di.id, di.name, di.work_type, di.updated... &lt;where&gt; &lt;if test=&qu
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct redisServer’没有名为‘server_cpulist’的成员 redisSetCpuAffinity(server.server_cpulist); ^ server.c: 在函数‘hasActiveC
解决方案1 1、改项目中.idea/workspace.xml配置文件,增加dynamic.classpath参数 2、搜索PropertiesComponent,添加如下 &lt;property name=&quot;dynamic.classpath&quot; value=&quot;tru
删除根组件app.vue中的默认代码后报错:Module Error (from ./node_modules/eslint-loader/index.js): 解决方案:关闭ESlint代码检测,在项目根目录创建vue.config.js,在文件中添加 module.exports = { lin
查看spark默认的python版本 [root@master day27]# pyspark /home/software/spark-2.3.4-bin-hadoop2.7/conf/spark-env.sh: line 2: /usr/local/hadoop/bin/hadoop: No s
使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-