搜索" basepython"?

时间:2018-01-16 04:56:55

标签: python jenkins cloudbees pythonpath tox

目前,我们在cloudbees上的Build Environment

curl -s -o use-python https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/python/use-python
chmod u+x use-python

# Get all Python distributions from CloudBees
supported=("2.7.14" "3.4.7" "3.5.4" "3.6.4")
for version in "${supported[@]}"; do   
    export PYTHON_VERSION=$version
    . ./use-python
done

# Sanity checks.
python --version
python2 --version
python2.7 --version
python3 --version
python3.4 --version
python3.5 --version
python3.6 --version

which python
which python2
which python3

which python2.7
which python3.4
which python3.5
which python3.6

tox.ini中,我们已在第https://github.com/nltk/nltk/blob/develop/tox.ini#L84行宣布basepython=3.4

[testenv:py34-jenkins]
basepython = python3.4
commands = {toxinidir}/jenkins.sh

我们在cloudbees CI服务器上的设置可以找到我们的Python3.4解释器,正如我们在which python看到的那样:https://nltk.ci.cloudbees.com/job/nltk/808/TOXENV=py34-jenkins,jdk=jdk8latestOnlineInstall/console

但是当它运行tox时,它就扔了InterpreterNotFound

+ which python3.4
/scratch/jenkins/python/python-3.4.7-x86_64/bin/python3.4
+ which python3.5
/scratch/jenkins/python/python-3.5.4-x86_64/bin/python3.5
+ which python3.6
/scratch/jenkins/python/python-3.6.4-x86_64/bin/python3.6
+ mkdir -p /home/jenkins/lib
+ '[' -f /home/jenkins/lib/libblas.so ']'
+ ln -sf /usr/lib64/libblas.so.3 /home/jenkins/lib/libblas.so
+ '[' -f /home/jenkins/lib/liblapack.so ']'
+ ln -sf /usr/lib64/liblapack.so.3 /home/jenkins/lib/liblapack.so
[EnvInject] - Script executed successfully.
[jdk8latestOnlineInstall] $ /scratch/jenkins/shiningpanda/jobs/280e15ca/tools/bin/python -c "import pip; pip.main();" install --upgrade tox
Requirement already up-to-date: tox in /scratch/jenkins/shiningpanda/jobs/280e15ca/tools/lib/python2.7/site-packages
Requirement already up-to-date: virtualenv>=1.11.2 in /scratch/jenkins/shiningpanda/jobs/280e15ca/tools/lib/python2.7/site-packages (from tox)
Requirement already up-to-date: six in /scratch/jenkins/shiningpanda/jobs/280e15ca/tools/lib/python2.7/site-packages (from tox)
Requirement already up-to-date: py>=1.4.17 in /scratch/jenkins/shiningpanda/jobs/280e15ca/tools/lib/python2.7/site-packages (from tox)
Requirement already up-to-date: pluggy<1.0,>=0.3.0 in /scratch/jenkins/shiningpanda/jobs/280e15ca/tools/lib/python2.7/site-packages (from tox)
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[jdk8latestOnlineInstall] $ /scratch/jenkins/shiningpanda/jobs/280e15ca/tools/bin/python -c "import tox; tox.cmdline();" -c tox.ini
GLOB sdist-make: /scratch/jenkins/workspace/nltk/TOXENV/py34-jenkins/jdk/jdk8latestOnlineInstall/setup.py
py34-jenkins create: /scratch/jenkins/workspace/nltk/TOXENV/py34-jenkins/jdk/jdk8latestOnlineInstall/.tox/py34-jenkins
ERROR: InterpreterNotFound: python3.4

一些相关问题:

  • 搜索basepython时,tox的位置在哪里?

  • 是否正在寻找PYTHONPATH?

  • 如何设置tox,以便将自定义路径附加到应该查找basepython的位置?

    < / LI>
  • python3.4位于PATH环境变量中,为什么没有tox在那里寻找?

0 个答案:

没有答案