cogeotiff/rio-cogeo

Installation error on ubuntu 20.04 docker image

Fahdben opened this issue · 2 comments

Hi @vincentsarago,

I'm having an issue when installing rio-cogeo with an ubuntu 20.04 docker image, maybe you can help!
In a container (based on ubuntu 20.04) I install python3 (3.8.10), upgrade pip (22.0.3) and run pip install rio-cogeo and I get the following error:

Collecting rio-cogeo
  Downloading rio-cogeo-3.1.0.tar.gz (18 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [36 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-og17kviz/rio-cogeo_9daf1ed72cf74781827e26f055079e4b/setup.py", line 23, in <module>
          setup(
        File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 144, in setup
          return distutils.core.setup(**attrs)
        File "/usr/lib/python3.8/distutils/core.py", line 121, in setup
          dist.parse_config_files()
        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 701, in parse_config_files
          parse_configuration(self, self.command_options,
        File "/usr/lib/python3/dist-packages/setuptools/config.py", line 121, in parse_configuration
          meta.parse()
        File "/usr/lib/python3/dist-packages/setuptools/config.py", line 426, in parse
          section_parser_method(section_options)
        File "/usr/lib/python3/dist-packages/setuptools/config.py", line 399, in parse_section
          self[name] = value
        File "/usr/lib/python3/dist-packages/setuptools/config.py", line 184, in __setitem__
          value = parser(value)
        File "/usr/lib/python3/dist-packages/setuptools/config.py", line 515, in _parse_version
          version = self._parse_attr(value, self.package_dir)
        File "/usr/lib/python3/dist-packages/setuptools/config.py", line 349, in _parse_attr
          module = import_module(module_name)
        File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
        File "<frozen importlib._bootstrap>", line 991, in _find_and_load
        File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
        File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
        File "<frozen importlib._bootstrap_external>", line 848, in exec_module
        File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
        File "/tmp/pip-install-og17kviz/rio-cogeo_9daf1ed72cf74781827e26f055079e4b/rio_cogeo/__init__.py", line 3, in <module>
          from .cogeo import cog_info, cog_translate, cog_validate  # noqa
        File "/tmp/pip-install-og17kviz/rio-cogeo_9daf1ed72cf74781827e26f055079e4b/rio_cogeo/cogeo.py", line 12, in <module>
          import click
      ModuleNotFoundError: No module named 'click'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

When I try to install the previous version 3.0.3 the install is successful.

Maybe I'm missing something,
Thanks!

this is the same as developmentseed/morecantile#83 which is really strange because setuptool should not make any import on version check.

Thanks @vincentsarago! the setuptools upgrade solved the issue for me