2017-04-08 15 views
5

पता लगाने में असमर्थ था, मैं इस त्रुटि हो रही है:pytest-xdist: LookupError: setuptools-SCM जब <code>pytest-xdist</code> स्थापित करने संस्करण

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 स्थापित करने में सक्षम था, लेकिन मैं कर रहा हूँ यकीन नहीं क्या बदल :(

उत्तर

4

ऐसा लगता है कि आप https://github.com/pypa/setuptools_scm/issues/164 कम पड़ रहा है समाधान के लिए तुम इतनी तरह अपने requirements.txt में पिछले संस्करण में setuptools-SCM पिन कर सकते हैं:।

setuptools_scm == 1.15.0 

संपादित करें: समस्या को अपस्ट्रीम तय किया गया है और setuptools-scm का एक नया संस्करण जारी किया गया है (1.15.4)। संस्करण को पिन किए बिना भी आपको यह समस्या नहीं दिखाई देनी चाहिए।

संबंधित मुद्दे