Package Details: python-transformers 4.57.1-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 Natural Language Processing for Jax, PyTorch and TensorFlow
Upstream URL: https://github.com/huggingface/transformers
Keywords: huggingface transformers
Licenses: Apache-2.0
Submitter: filipg
Maintainer: daskol
Last Packager: daskol
Votes: 16
Popularity: 0.81
First Submitted: 2021-10-23 09:30 (UTC)
Last Updated: 2025-11-05 20:02 (UTC)

Sources (1)

Latest Comments

1 2 3 4 5 Next › Last »

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).

envolution commented on 2025-07-29 22:30 (UTC)

@daskol I'm confused how you're running checks before bumping the version if the required version of huggingface-hub was released 2 hours ago

daskol commented on 2025-07-29 21:05 (UTC)

@envolution Of course, stage check in PKGBUILD addresses exactly this issue.

There's a number of packages that depend on this and it may be worthwhile to withhold version increments until upstream dependencies dependencies catch up:

https://gitlab.archlinux.org/archlinux/packaging/packages/python-huggingface-hub/-/commits/main/PKGBUILD?ref_type=heads

envolution commented on 2025-07-29 01:39 (UTC)

@daskol out of curiosity, are you running build tests before bumping versions? There's a number of packages that depend on this and it may be worthwhile to withhold version increments until upstream dependencies dependencies catch up:

clone/python-transformers/src/transformers-4.54.0/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==0.33.5.

If you would like I can help with this