Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: '<' not supported between instances of 'Version' and 'Version' when installing manually. #118

Closed
TheChymera opened this issue Feb 1, 2022 · 4 comments

Comments

@TheChymera
Copy link

I understand setup.py is no longer recommended, but the error seems to be in comparing the string 'Version' to a version. Any idea where that might be happening?

chymera@decohost ~/src/dandi-cli $ git show-ref --heads -s
9a42b1fa2f9af3be01254f7457f5a21d834c1864
chymera@decohost ~/src/dandi-cli $ python setup.py develop --user
running develop
/usr/lib/python3.9/site-packages/setuptools/command/easy_install.py:156: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/usr/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running egg_info
creating dandi.egg-info
writing manifest file 'dandi.egg-info/SOURCES.txt'
writing manifest file 'dandi.egg-info/SOURCES.txt'
running build_ext
/usr/lib/python3.9/site-packages/pkg_resources/__init__.py:116: PkgResourcesDeprecationWarning:  is an invalid version and will not be supported in a future release
  warnings.warn(
Installing zarr-2.11.0a2-py3-none-any.whl to /home/chymera/.local/lib/python3.9/site-packages
Installing interleave-0.1.1-py3-none-any.whl to /home/chymera/.local/lib/python3.9/site-packages
Installing etelemetry-0.3.0-py3-none-any.whl to /home/chymera/.local/lib/python3.9/site-packages
Installing dandischema-0.5.2-py3-none-any.whl to /home/chymera/.local/lib/python3.9/site-packages
Installing numcodecs-0.10.0a1-cp39-cp39-manylinux2010_x86_64.whl to /home/chymera/.local/lib/python3.9/site-packages
listing git files failed - pretending there aren't any
/usr/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
zip_safe flag not set; analyzing archive contents...
Moving asciitree-0.3.3-py3.9.egg to /home/chymera/.local/lib/python3.9/site-packages
Adding asciitree 0.3.3 to easy-install.pth file
Traceback (most recent call last):
  File "/home/chymera/src/dandi-cli/setup.py", line 41, in <module>
    setup(name="dandi", **setup_kw)
  File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 155, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 148, in setup
    return run_commands(dist)
  File "/usr/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 163, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 967, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 986, in run_command
    cmd_obj.run()
  File "/usr/lib/python3.9/site-packages/setuptools/command/develop.py", line 34, in run
    self.install_for_development()
  File "/usr/lib/python3.9/site-packages/setuptools/command/develop.py", line 129, in install_for_development
    self.process_distribution(None, self.dist, not self.no_deps)
  File "/usr/lib/python3.9/site-packages/setuptools/command/easy_install.py", line 755, in process_distribution
    distros = WorkingSet([]).resolve(
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 771, in resolve
    dist = best[req.key] = env.best_match(
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1056, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1068, in obtain
    return installer(requirement)
  File "/usr/lib/python3.9/site-packages/setuptools/command/easy_install.py", line 682, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python3.9/site-packages/setuptools/command/easy_install.py", line 710, in install_item
    self.process_distribution(spec, dist, deps)
  File "/usr/lib/python3.9/site-packages/setuptools/command/easy_install.py", line 732, in process_distribution
    self.package_index.add(dist)
  File "/usr/lib/python3.9/site-packages/setuptools/package_index.py", line 303, in add
    return super().add(dist)
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1028, in add
    dists.sort(key=operator.attrgetter('hashcmp'), reverse=True)
TypeError: '<' not supported between instances of 'Version' and 'Version'
@TheChymera
Copy link
Author

For the record, it did eventually work, but required python setup.py develop --user --no-deps.

@jwodder
Copy link
Member

jwodder commented Feb 1, 2022

@TheChymera I don't believe this has anything to do with dandi (and if it does, it belongs on the dandi-cli repo, not dandischema). It looks more like a bug in setuptools (or possibly versioneer).

@jwodder
Copy link
Member

jwodder commented Feb 1, 2022

@TheChymera Likely related: pypa/setuptools#1383

@TheChymera
Copy link
Author

@jwodder and sorry for opening the issue here, I think I landed on the wrong issues page tab :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants