Package Details: python-transformers 5.7.0-1

Git Clone URL: https://aur.archlinux.org/python-transformers.git (read-only, click to copy)
Package Base: python-transformers
Description: State-of-the-art pretrained models for inference and training
Upstream URL: https://github.com/huggingface/transformers
Keywords: huggingface transformers
Licenses: Apache-2.0
Submitter: filipg
Maintainer: daskol
Last Packager: daskol
Votes: 18
Popularity: 1.19
First Submitted: 2021-10-23 09:30 (UTC)
Last Updated: 2026-04-28 19:28 (UTC)

Required by (96)

Sources (1)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 7 Next › Last »

Zerout commented on 2026-01-26 09:53 (UTC)

The final release of v5.0.0 is out.

https://github.com/huggingface/transformers/releases/tag/v5.0.0

daskol commented on 2025-11-22 20:32 (UTC)

@F1729 I just relax dependency version check on huggingface-hub. It seems working with extra/python-huggingface-hub.

shayaknyc commented on 2025-11-17 17:31 (UTC)

@F1729 - thank you so much! This helped! Appreciate you!

F1729 commented on 2025-11-17 17:25 (UTC) (edited on 2025-11-17 17:25 (UTC) by F1729)

@shaynaknyc You can locally resolve the issue by downgrading the package "python-huggingface-hub" to the last compatible version, 0.36.0.

@daskol Would it make sense to specify the dependency to "python-huggingface-hub < 1.0" until the issue is resolved upstream?

shayaknyc commented on 2025-11-12 17:45 (UTC)

Sooo....like....do we just sit and wait for upstream to fix this? Is there no workaround or manually applied fix?

racehd commented on 2025-11-10 14:47 (UTC)

Do we actually know why originally the huggingface-hub version has been limited to be < 1.0?

There's more info upstream: https://github.com/huggingface/transformers/issues/41970 . Mainly, huggingfacehub 1.0 is mentioned to have broke a lot of projects that otherwise worked well with the current release of transformers. So this was an intentional choice upstream made at some point to have tight interdependencies.

From github i see, that main branch has "huggingface-hub>=1.0.0,<2.0", defined in dependecies.

I do see the upstream setup.py has incremented the huggingface-hub version check. This AUR project is tied to releases which there has not been a new one yet for this change and whatever else they have worked on to make it more compatible with huggingfacehub 1.0+

Pyblo commented on 2025-11-10 12:55 (UTC) (edited on 2025-11-10 13:02 (UTC) by Pyblo)

the issue with huggingface-hub dependency still persists:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import transformers
  File "/home/paws/.cache/yay/python-transformers/src/transformers-4.57.1/src/transformers/__init__.py", line 27, in <module>
    from . import dependency_versions_check
  File "/home/paws/.cache/yay/python-transformers/src/transformers-4.57.1/src/transformers/dependency_versions_check.py", line 57, in <module>
    require_version_core(deps[pkg])
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  File "/home/paws/.cache/yay/python-transformers/src/transformers-4.57.1/src/transformers/utils/versions.py", line 117, in require_version_core
    return require_version(requirement, hint)
  File "/home/paws/.cache/yay/python-transformers/src/transformers-4.57.1/src/transformers/utils/versions.py", line 111, in require_version
    _compare_versions(op, got_ver, want_ver, requirement, pkg, hint)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/paws/.cache/yay/python-transformers/src/transformers-4.57.1/src/transformers/utils/versions.py", line 44, in _compare_versions
    raise ImportError(
        f"{requirement} is required for a normal functioning of this module, but found {pkg}=={got_ver}.{hint}"
    )
ImportError: huggingface-hub>=0.34.0,<1.0 is required for a normal functioning of this module, but found huggingface-hub==1.1.2.
Try: `pip install transformers -U` or `pip install -e '.[dev]'` if you're working with git main

Do we actually know why originally the huggingface-hub version has been limited to be < 1.0?

From github i see, that main branch has "huggingface-hub>=1.0.0,<2.0", defined in dependecies.

max2000warlord commented on 2025-11-07 02:06 (UTC)

Adding:

prepare() { cd "$_pkgname-$pkgver"

sed -i 's/"huggingface-hub>=0.34.0,<1.0"/"huggingface-hub>=0.34.0"/g' src/transformers/dependency_versions_table.py

to the PKGBUILD immediately after depends=()

worked for me

racehd commented on 2025-11-06 13:40 (UTC) (edited on 2025-11-06 13:57 (UTC) by racehd)

Hello, thank you for maintaining this. I am getting the same error during check stage:

ImportError: huggingface-hub>=0.34.0,<1.0 is required for a normal functioning of this module, but found huggingface-hub==1.1.1.

Which I realize is an issue with the upstream having the import step check the version of huggingface-hub hardcoded into it. It did seem strange to me that what triggered the python-transformers update was the update to huggingface-hub, even though the two versions are incompatible. But thinking about it differently:

Had python-transformers NOT updated (suggested below), then anything trying to import transformers would still fail because:

  • upstream's import checks what version of huggingface-hub is installed (with an upper limit)
  • huggingface-hub updated before upstream transformers, making the two incompatible

I'm not really sure what the best solution there is besides users downgrading huggingface-hub and managing their versions themselves (which is what I did for now).