如何在Ubuntu14.04上设置python3.2进行tox测试?

2024-04-25 05:11:47 发布

您现在位置:Python中文网/ 问答频道 /正文

尝试在推送之前使用tox运行测试,但我一直遇到错误,例如:

ERROR:   py26: InterpreterNotFound: python2.6
ERROR:   py32: InterpreterNotFound: python3.2
ERROR:   py34: InterpreterNotFound: python3.3

apt缓存搜索并没有提供任何看起来有用的包。如何为ubuntu14.04加载所有这些版本的解释器?在


Tags: 版本tox错误apterror解释器py34py32
1条回答
网友
1楼 · 发布于 2024-04-25 05:11:47

显然,Ubuntu并没有提供Python的所有历史版本。但是您可以使用deadsnakes PPA,它包含从2.3到3.4的所有内容。在

我用过的一个项目无人机.ioCI服务,在实际测试环境之前,我运行了以下毒物部分。在

[testenv:setupdrone]
whitelist_externals = /bin/bash
commands            =
  bash -c "echo 'debconf debconf/frontend select noninteractive' | sudo debconf-set-selections"
  bash -c "sudo add-apt-repository ppa:fkrull/deadsnakes &> /dev/null"
  bash -c "sudo apt-get update &> /dev/null"
  bash -c "sudo apt-get -y install python2.6 python3.4 &> /dev/null"

相关问题 更多 >