`python setup.py test`是否安装了依赖项?

时间:2017-11-30 07:19:38

标签: python testing setuptools

首先,它看起来像是安装了测试依赖项(Processing coverage-4.4.2-py3.5.egg),然后突然间它们不是(The 'coverage' module is not installed)。出了什么问题?

(DictORM) 14:15 john@john:~/git/DictORM(master)$ python setup.py test --run-coverage
running green
Searching for coveralls
Best match: coveralls 1.2.0
Processing coveralls-1.2.0-py3.5.egg

Using /home/john/repos/git/DictORM/.eggs/coveralls-1.2.0-py3.5.egg
Searching for coverage
Best match: coverage 4.4.2
Processing coverage-4.4.2-py3.5.egg

Using /home/john/repos/git/DictORM/.eggs/coverage-4.4.2-py3.5.egg
Searching for docopt>=0.6.1
Best match: docopt 0.6.2
Processing docopt-0.6.2-py3.5.egg

Using /home/john/repos/git/DictORM/.eggs/docopt-0.6.2-py3.5.egg
Fatal: The 'coverage' module is not installed.  Have you run 'pip install coverage' ???

1 个答案:

答案 0 :(得分:1)

确实如此。此环境中的导入错误是由绿色实际上未将coverage指定为额外依赖项引起的。我们决定在2.12.0中使它成为必需的依赖项,修复了这个问题。 The bug fix was discussed here