首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >pytest-xdist: LookupError: setuptools-scm无法检测版本

pytest-xdist: LookupError: setuptools-scm无法检测版本
EN

Stack Overflow用户
提问于 2017-04-08 00:08:27
回答 1查看 3.3K关注 0票数 7

在安装pytest-xdist时,我会得到以下错误:

代码语言:javascript
复制
Collecting pytest-xdist>=1.15.0
  Downloading https://company.com/pypi/packages/dc/b2/a59db3ef996b93c3ef35dbbc33557a71ef67a6839d94a52c88eeb1086002/pytest-xdist-1.15.0.tar.gz (87kB)
    100% |████████████████████████████████| 92kB 70.2MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-vyEgO5/pytest-xdist/setup.py", line 37, in <module>
        'Programming Language :: Python :: 3',
      File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/company/package_name/env/local/lib/python2.7/site-packages/setuptools/dist.py", line 318, in __init__
        _Distribution.__init__(self, attrs)
      File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "/home/company/package_name/env/local/lib/python2.7/site-packages/setuptools/dist.py", line 376, in finalize_options
        ep.load()(self, ep.name, value)
      File "build/bdist.linux-x86_64/egg/setuptools_scm/integration.py", line 21, in version_keyword
      File "build/bdist.linux-x86_64/egg/setuptools_scm/__init__.py", line 118, in get_version
      File "build/bdist.linux-x86_64/egg/setuptools_scm/__init__.py", line 96, in _do_parse
    LookupError: setuptools-scm was unable to detect version for '/tmp/pip-build-vyEgO5/pytest-xdist'.

    Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

    For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-vyEgO5/pytest-xdist/

我以前成功地安装了pytest-xdist,但是我不确定是什么改变了:

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-04-08 12:19:52

看上去你在打scm/issues/164。作为一种解决方法,您可以将setuptools-scm连接到requirements.txt中的前一个版本,如下所示:

代码语言:javascript
复制
setuptools_scm == 1.15.0

编辑:问题已经解决上游和一个新版本的setuptools-scm已经发布(1.15.4)。即使没有固定版本,您也不应该再看到这个问题。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43288756

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档