jenkins使用python plugin编写代码构建时报错:Caused: java.io.IOException: Cannot run program “python“
jenkins的python plugin``编写代码构建时报错:
Building in workspace D:\Jenkins\workspace\pytest项目
[pytest项目] $ python C:\Windows\TEMP\jenkins1719562851337506537.py
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: CreateProcess error=2, 系统找不到指定的文件。at java.lang.ProcessImpl.create(Native Method)at java.lang.ProcessImpl.<init>(Unknown Source)at java.lang.ProcessImpl.start(Unknown Source)
Caused: java.io.IOException: Cannot run program "python" (in directory "D:\Jenkins\workspace\pytest项目"): CreateProcess error=2, 系统找不到指定的文件。at java.lang.ProcessBuilder.start(Unknown Source)at hudson.Proc$LocalProc.<init>(Proc.java:252)at hudson.Proc$LocalProc.<init>(Proc.java:221)at hudson.Launcher$LocalLauncher.launch(Launcher.java:936)at hudson.Launcher$ProcStarter.start(Launcher.java:454)at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)at hudson.model.Build$BuildExecution.build(Build.java:206)at hudson.model.Build$BuildExecution.doRun(Build.java:163)at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)at hudson.model.Run.execute(Run.java:1856)at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)at hudson.model.ResourceController.execute(ResourceController.java:97)at hudson.model.Executor.run(Executor.java:428)
Build step 'Execute Python script' marked build as failure
Finished: FAILURE
其中我们看到这一句:
**Caused: java.io.IOException: Cannot run program “python” (in directory “D:\Jenkins\workspace\pytest项目”): CreateProcess error=2, 系统找不到指定的文件。
at java.lang.ProcessBuilder.start(Unknown Source)
大概的意思是python程序没有添加到环境变量中,导致python程序没找到,运行失败`!!``
**
解决办法:把windows本地python的安装路径添加到系统变量的path中,,注意一定要是系统变量的path 如我本地的python安装路径为:C:\Users\admin\AppData\Local\Programs\Python\Python37\
添加完成后保存,并重启jenkins,再构建一遍
构建完成
jenkins使用python plugin编写代码构建时报错:Caused: java.io.IOException: Cannot run program “python“相关推荐
- 【Jenkins】解决检出git仓库时报错Caused by: java.io.IOException: Cannot run program “git“
Jenkins中配置从一个win7的slave节点检出git仓库时报如下错误: git init E:\jenkins\workspace\Git-backup # timeout=10 ERROR: ...
- 使用createNewFile时报错:java.io.IOException: 系统找不到指定的路径
在使用createNewFile方法时,报java.io.IOException: 系统找不到指定的路径.这个错误. 是因为在使用构造方法时,使用的**File(String pathname)路径名 ...
- python医疗系统代码_吴裕雄 人工智能 java、javascript、HTML5、python、oracle ——智能医疗系统WEB端复诊代码简洁版实现...
#诊断逻辑代码 importsysimportosimporttimeimportoperatorimportcx_Oracleimportnumpy as npimportpandas as pdi ...
- python医疗系统代码_吴裕雄 人工智能 java、javascript、HTML5、python、oracle ——智能医疗系统WEB端初诊代码简洁版实现...
#系统核心事务逻辑处理代码 importsysimportosimportcx_Oracleimportnumpy as npimportpandas as pdimporttensorflow as ...
- Cannot run program python问题解决
java.io.IOException: Cannot run program "python": CreateProcess error=2???? String command ...
- Jenkins构建时报错 GitERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException
--昨夜西风凋碧树,独上高楼,望尽天涯路 Jenkins + GitLab持续集成时遇到如下错误: ERROR: Error cloning remote repo 'origin' hudson.p ...
- java.io.IOException: Jenkins Mailer Plugin v1.23 failed to load.(出现Jenkins插件安装报错并且无法成功等问题)
出现报错情况 java.io.IOException: Jenkins Mailer Plugin v1.23 failed to load.- Display URL API v2.3.2 fail ...
- window中搭建jenkins_Windows环境中的jenkins构建时报错
按照第三章的讲解进行安装配置后,最后尝试连接进行验证时,可以走通.但是到第五章实际实现自动化部署任务时,按照课程的讲解配置完后,构建时报错:Started by user adminRunning a ...
- 问题记录:jenkins构建时报错The goal you specified requires a project to execute but there is no POM in...
jenkins构建时报错:The goal you specified requires a project to execute but there is no POM in this direct ...
- python 调用event handler_扣丁学堂Python开发之调用语音模块时报错及解决方法
扣丁学堂Python开发之调用语音模块时报错及解决方法 2018-03-09 11:45:57 3346浏览 python调用语音模块时,遇见TypeError:NoneTypetakesnoargu ...
最新文章
- 点击TableView任一行跳转详情页面会跳转两次的解决办法
- Intellij-Cannot download Sources解决方法
- Linux Netcat 命令——网络工具中的瑞士×××
- 在家也能做化学实验!VR教育机构MEL Science获250万美元融资
- 使用java的html解析器jsoup和jQuery实现一个自动重复抓取任意网站页面指定元素的web应用...
- python嵌套字典赋值_Python:更新深度嵌套字典中的值
- python matplotlib.pyplot() plt() 如何限制坐标的上下限?plt.xlim() plt.ylim()
- java关联查询实战_MapReduce实战(五)实现关联查询
- html语言中div怎么起名,css如何命名?
- 停止从域服务器同步文件,域控制器不同步处理办法
- P4316-绿豆蛙的归宿【数学期望】
- ACM 网址和一些建议
- Linux内核奔溃分析
- 别琢磨了,企业高效灵活运作的秘密拿走:企业邮箱5折起!分享会场抽取苹果手机和猫超卡!
- 数论19——高斯消元
- idea原生ajax数据处理(增删改查)
- Android中onActivityResult/startActivityForResult用法
- 纯CSS实现button按钮
- 购买大米云主机并配置php环境搭建企业网站
- android 字体调节大小,教你如何修改Android默认字体大小和设置字体大小比例