https://pantsbuild.org/ logo
#general
Title
# general
f

freezing-area-97131

04/01/2022, 10:53 AM
Hi~ Now I have upgraded to
1.25.0
, and got this error when running
./pants test …
. How do I find out which packages cause this conflict?
Copy code
Exception message: Could not satisfy all requirements for pytest<4.7,>=4.6.6:
    pytest<4.7,>=4.6.6, pytest<5.4,>=5.3.5
👀 1
h

happy-kitchen-89482

04/01/2022, 2:56 PM
That looks like a conflict between your
pytest_plugins = +["importlib_metadata==2.1.3", "pytest>=4.6.6,<4.7", "coverage==5.2.1"]
and Pants's default, which is set by
version
under
[pytest]
.
So you want to be sure to set
version = "pytest>=4.6.6,<4.7"
and I don't think you need to mention
pytest
at all in
pytest_plugins
f

freezing-area-97131

04/01/2022, 5:03 PM
ok~ After I removed it and ran it again, I got this:
Copy code
**** Failed to install pytest-5.3.5 (caused by: NonZeroExit("received exit code 1 during execution of `['/usr/bin/python2.7', '-s', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpv4cu0fne']` while trying to execute `['/usr/bin/python2.7', '-s', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpv4cu0fne']`",)
):
stdout:

stderr:
Traceback (most recent call last):
  File "<stdin>", line 14, in <module>
  File "<string>", line 42, in <module>
  File "<string>", line 37, in main
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/__init__.py", line 166, in setup
    _install_setup_requires(attrs)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/__init__.py", line 161, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/dist.py", line 626, in fetch_build_eggs
    replace_conflicting=True,
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 812, in resolve
    replace_conflicting=replace_conflicting
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 1095, in best_match
    return self.obtain(req, installer)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 1107, in obtain
    return installer(requirement)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/dist.py", line 697, in fetch_build_egg
    return cmd.easy_install(req)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 738, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 764, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 949, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 1217, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 1203, in run_setup
    run_setup(setup_script, args)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 277, in run_setup
    raise
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 219, in setup_context
    yield
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 186, in save_modules
    saved_exc.resume()
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 161, in resume
    six.reraise(type, exc, self._tb)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 174, in save_modules
    yield saved
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 219, in setup_context
    yield
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 274, in run_setup
    _execfile(setup_script, ns)
  File "/tmp/tmp1pfl9914/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 61, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-p7ZfuF/setuptools_scm-6.4.2/setup.py", line 60, in <module>
    
  File "/tmp/easy_install-p7ZfuF/setuptools_scm-6.4.2/setup.py", line 31, in scm_version
    "xmlschema",
RuntimeError: support for python < 3.6 has been removed in setuptools_scm>=6.0.0



               Waiting for background workers to finish.
09:57:56 00:04   [complete]
               FAILURE
I think my whole repo is in python2.7. What should I do?
h

happy-kitchen-89482

04/01/2022, 6:13 PM
Well, the issue here is that it's still trying to install pytest-5.3.5 for some reason
you set
version = "pytest>=4.6.6,<4.7"
?
f

freezing-area-97131

04/02/2022, 2:08 AM
Where should I put that line?
ok now I got this
And if I remove that line
"zipp==1.2.0"
, I will get this:
Copy code
[WARN] /home/cedriczheng/.cache/pants/setup/bootstrap-Linux-x86_64/1.25.0_py36/lib/python3.6/site-packages/pex/pep425tags.py:274: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp

**** Failed to install zipp-2.1.0 (caused by: NonZeroExit("received exit code 1 during execution of `['/usr/bin/python2.7', '-s', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpb31gy4ck']` while trying to execute `['/usr/bin/python2.7', '-s', '-', 'bdist_wheel', '--dist-dir=/tmp/tmpb31gy4ck']`",)
):
stdout:

stderr:
Traceback (most recent call last):
  File "<stdin>", line 14, in <module>
  File "<string>", line 6, in <module>
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/__init__.py", line 166, in setup
    _install_setup_requires(attrs)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/__init__.py", line 161, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/dist.py", line 626, in fetch_build_eggs
    replace_conflicting=True,
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 812, in resolve
    replace_conflicting=replace_conflicting
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 1095, in best_match
    return self.obtain(req, installer)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/pkg_resources/__init__.py", line 1107, in obtain
    return installer(requirement)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/dist.py", line 697, in fetch_build_egg
    return cmd.easy_install(req)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 738, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 764, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 949, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 1217, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/command/easy_install.py", line 1203, in run_setup
    run_setup(setup_script, args)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 277, in run_setup
    raise
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 219, in setup_context
    yield
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 186, in save_modules
    saved_exc.resume()
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 161, in resume
    six.reraise(type, exc, self._tb)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 174, in save_modules
    yield saved
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 219, in setup_context
    yield
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 274, in run_setup
    _execfile(setup_script, ns)
  File "/tmp/tmpcu5u327s/pex/vendor/_vendored/setuptools/setuptools/sandbox.py", line 61, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-AZyusS/setuptools_scm-6.4.2/setup.py", line 60, in <module>
    
  File "/tmp/easy_install-AZyusS/setuptools_scm-6.4.2/setup.py", line 31, in scm_version
    
RuntimeError: support for python < 3.6 has been removed in setuptools_scm>=6.0.0
7 Views