通过Jenkins

时间:2016-10-10 23:56:01

标签: python jenkins cygwin python-import

我正在尝试在我的python脚本中导入 scipy numpy 。 这个脚本是由Jenkins在安装了cygwin python3.4的windows slave机器上触发的。

我已成功通过奴隶本身的cygwin终端运行脚本 但是无法通过Jenkins在Jenkins的构建中使用以下命令触发脚本:

python3 $PATH_TO_THE_SCRIPT/test_python.py

“test_python.py”中只有3行

#!/usr/bin/python
import sys, os
import sounddevice
import scipy.io.wavfile

在Jenkins上给我一个错误

Building remotely on client1 (test_recording) in workspace c:/jenkins/workspace/sound_check_recording
next nodes: [][sound_check_recording] $ sh -xe C:\cygwin64\tmp\hudson7552321748368548110.sh
+ python3 c:/cygwin64/lib/python3.4/test_python.py
Traceback (most recent call last):
  File "c:/cygwin64/lib/python3.4/test_python.py", line 4, in <module>
    import scipy.io.wavfile
  File "/usr/lib/python3.4/site-packages/scipy/__init__.py", line 61, in <module>
    from numpy import show_config as show_numpy_config
  File "/usr/lib/python3.4/site-packages/numpy/__init__.py", line 170, in <module>
    from . import add_newdocs
  File "/usr/lib/python3.4/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/lib/python3.4/site-packages/numpy/lib/__init__.py", line 18, in <module>
    from .polynomial import *
  File "/usr/lib/python3.4/site-packages/numpy/lib/polynomial.py", line 19, in <module>
    from numpy.linalg import eigvals, lstsq, inv
  File "/usr/lib/python3.4/site-packages/numpy/linalg/__init__.py", line 51, in <module>
    from .linalg import *
  File "/usr/lib/python3.4/site-packages/numpy/linalg/linalg.py", line 29, in <module>
    from numpy.linalg import lapack_lite, _umath_linalg
ImportError: No such file or directory
Build step 'Execute shell' marked build as failure
Finished: FAILURE

我确实检查了文件系统但没有在包中找到任何遗漏。 这似乎是一个PATH问题。使用Jenkins和Cygwin python时有没有人遇到过同样的问题?欢迎任何反馈。

0 个答案:

没有答案