CompVis / taming-transformers

Taming Transformers for High-Resolution Image Synthesis
https://arxiv.org/abs/2012.09841
MIT License
5.82k stars 1.15k forks source link

Invalid version: '0.10.1,<0.11' #220

Closed EinfachYan closed 1 year ago

EinfachYan commented 1 year ago

it's my first time running anaconda, got this error

File "c:\users\dell\anaconda3\envs\taming\lib\site-packages\packaging\version.py", line 198, in init raise InvalidVersion(f"Invalid version: '{version}'") packaging.version.InvalidVersion: Invalid version: '0.10.1,<0.11'

I tried pip install packaging==21.3 but it didn't work

what might be the problem?

aamijar commented 1 year ago

you can try this pip install transformers --upgrade

BasDiaz commented 1 year ago

The repo seems quite broken. I was able to avoid this error commenting out require_version_core(deps[pkg]) in the transformers.dependency_versions_check file. Definitely not a real fix but a workaround

chuanshuogushi commented 1 year ago

I solved this by pip install transformers==4.19.2

EinfachYan commented 1 year ago

This error refers to the version of tokenizers, which must be less than 0.11. I downloaded 0.10.3, which is an older version and cannot be directly downloaded using conda or pip; otherwise, it will result in the error 'Could not build wheels for tokenizers'. It requires a Rust compiler. One of the methods is to download Visual Studio and then install the C++ components.

EinfachYan commented 1 year ago

The repo seems quite broken. I was able to avoid this error commenting out require_version_core(deps[pkg]) in the transformers.dependency_versions_check file. Definitely not a real fix but a workaround

This repo is a bit old, and the libraries it uses have been updated many times. We need to downgrade these libraries to run it.

EinfachYan commented 1 year ago

you can try this pip install transformers --upgrade

thank you

EinfachYan commented 1 year ago

I solved this by pip install transformers==4.19.2

thank you