Skip to content

pip installation problems #456

@abubelinha

Description

@abubelinha

Hi. Thanks for this package.
Not sure if I understood correctly but I assume it can provide inaturalist-CV-based taxonomic suggestions for my images (even if they are NOT iNaturalist observations yet). Quote:

Naturtag gathers complete observation metadata (for iNaturalist observation photos), or just taxonomy metadata (for everything else)

I am on Windows 11, where I have two Python installations (3.9 and 3.13).

I first tried pip install naturtag on Python 3.9

That was apparently successful (although I know Python 3.10 is suggested, I don't know if it is mandatory).
But I couldn't run the example:

Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from naturtag import tag_images, refresh_tags
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'tag_images' from 'naturtag' (c:\python39\lib\site-packages\naturtag\__init__.py)
>>> import naturtag
>>> naturtag.__version__
'0.6.1'

Is there some old syntax that I could try to run the example so it still works in Python 3.9?


So I tried to install in Python 3.13:

c:\python313\scripts\pip install naturtag
Collecting naturtag
  Using cached naturtag-0.6.1-py3-none-any.whl.metadata (14 kB)
Collecting appdirs>=1.4 (from naturtag)
  Using cached appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)
Collecting attrs<22.0.0,>=21.2.0 (from naturtag)
  Using cached attrs-21.4.0-py2.py3-none-any.whl.metadata (9.8 kB)
Collecting click>=8.0 (from naturtag)
  Downloading click-8.3.1-py3-none-any.whl.metadata (2.6 kB)
Collecting click-help-colors>=0.9 (from naturtag)
  Using cached click_help_colors-0.9.4-py3-none-any.whl.metadata (4.1 kB)
Requirement already satisfied: pillow>=7.0 in c:\python313\lib\site-packages (from naturtag) (11.2.1)
Collecting pyexiv2>=2.4.0 (from naturtag)
  Downloading pyexiv2-2.15.5-cp313-none-win_amd64.whl.metadata (2.9 kB)
Collecting pyinaturalist<0.14.0,>=0.13.0 (from naturtag)
  Using cached pyinaturalist-0.13.0-py3-none-any.whl.metadata (12 kB)
Requirement already satisfied: python-dateutil>=2.0 in c:\python313\lib\site-packages (from naturtag) (2.9.0.post0)
Collecting pyyaml<6.0.0,>=5.4.1 (from naturtag)
  Downloading PyYAML-5.4.1.tar.gz (175 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [80 lines of output]
      C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\wheel\bdist_wheel.py:4: FutureWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.
        warn(
      C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\dist.py:765: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: MIT License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      running egg_info
      writing lib3\PyYAML.egg-info\PKG-INFO
      writing dependency_links to lib3\PyYAML.egg-info\dependency_links.txt
      writing top-level names to lib3\PyYAML.egg-info\top_level.txt
      Traceback (most recent call last):
        File "C:\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 389, in <module>
          main()
          ~~~~^^
        File "C:\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Python313\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\build_meta.py", line 333, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\build_meta.py", line 301, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\build_meta.py", line 317, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 271, in <module>
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)  # type: ignore[return-value]
                 ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 186, in setup
          return run_commands(dist)
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 202, in run_commands
          dist.run_commands()
          ~~~~~~~~~~~~~~~~~^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1002, in run_commands
          self.run_command(cmd)
          ~~~~~~~~~~~~~~~~^^^^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\dist.py", line 1107, in run_command
          super().run_command(command)
          ~~~~~~~~~~~~~~~~~~~^^^^^^^^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 1021, in run_command
          cmd_obj.run()
          ~~~~~~~~~~~^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 314, in run
          self.find_sources()
          ~~~~~~~~~~~~~~~~~^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 322, in find_sources
          mm.run()
          ~~~~~~^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 544, in run
          self.add_defaults()
          ~~~~~~~~~~~~~~~~~^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 582, in add_defaults
          sdist.add_defaults(self)
          ~~~~~~~~~~~~~~~~~~^^^^^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\command\sdist.py", line 110, in add_defaults
          super().add_defaults()
          ~~~~~~~~~~~~~~~~~~~~^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 245, in add_defaults
          self._add_defaults_ext()
          ~~~~~~~~~~~~~~~~~~~~~~^^
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 330, in _add_defaults_ext
          self.filelist.extend(build_ext.get_source_files())
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
        File "<string>", line 201, in get_source_files
        File "C:\Users\abu\AppData\Local\Temp\pip-build-env-mn22aody\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 131, in __getattr__
          raise AttributeError(attr)
      AttributeError: cython_sources
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.

[notice] A new release of pip is available: 25.1.1 -> 25.3
[notice] To update, run: C:\Python313\python.exe -m pip install --upgrade pip
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I am not sure if this might be the same issue as #434

Thanks a lot in advance for your answers
@abubelinha

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions