Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing wheel with "invalid version" #5478

Open
albertotb opened this issue Jul 26, 2024 · 9 comments
Open

Error installing wheel with "invalid version" #5478

albertotb opened this issue Jul 26, 2024 · 9 comments
Labels
compatibility Compatibility with a specification or another tool

Comments

@albertotb
Copy link

Version: uv 0.2.29

I'm not sure if this is intended or not:

uv pip install https://huggingface.co/PlanTL-GOB-ES/es_anonimization_core_lg/resolve/main/es_anonimization_core_lg-any-py3-none-any.whl

Fails with

error: The wheel filename "es_anonimization_core_lg-any-py3-none-any.whl" has an invalid version: expected version to start with a number, but no leading ASCII digits were found

However, the equivalent pip command is able to install the wheel:

pip install https://huggingface.co/PlanTL-GOB-ES/es_anonimization_core_lg/resolve/main/es_anonimization_core_lg-any-py3-none-any.whl
Collecting es-anonimization-core-lg==any
  Downloading https://huggingface.co/PlanTL-GOB-ES/es_anonimization_core_lg/resolve/main/es_anonimization_core_lg-any-py3-none-any.whl (587.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 587.8/587.8 MB 1.5 MB/s eta 0:00:00
@charliermarsh
Copy link
Member

In our current design this is intentional -- we require that wheels always have valid wheel filenames, and that isn't a valid filename (since it's omitting the version).

@charliermarsh charliermarsh added the compatibility Compatibility with a specification or another tool label Jul 26, 2024
@charliermarsh
Copy link
Member

We should support this, requires some refactors though.

@eth3lbert
Copy link
Contributor

Version: uv 0.2.29

I'm not sure if this is intended or not:

uv pip install https://huggingface.co/PlanTL-GOB-ES/es_anonimization_core_lg/resolve/main/es_anonimization_core_lg-any-py3-none-any.whl

Fails with

error: The wheel filename "es_anonimization_core_lg-any-py3-none-any.whl" has an invalid version: expected version to start with a number, but no leading ASCII digits were found

However, the equivalent pip command is able to install the wheel:

pip install https://huggingface.co/PlanTL-GOB-ES/es_anonimization_core_lg/resolve/main/es_anonimization_core_lg-any-py3-none-any.whl
Collecting es-anonimization-core-lg==any
  Downloading https://huggingface.co/PlanTL-GOB-ES/es_anonimization_core_lg/resolve/main/es_anonimization_core_lg-any-py3-none-any.whl (587.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 587.8/587.8 MB 1.5 MB/s eta 0:00:00

Apologies for the intrusion. Could you please specify which version of pip you are using?

I have tested this with pip version 24.2 and encountered the following error:

pip install https://huggingface.co/PlanTL-GOB-ES/es_anonimization_core_lg/resolve/main/es_anonimization_core_lg-any-py3-none-any.whl               
ERROR: Invalid requirement: 'es-anonimization-core-lg==any': Expected end or semicolon (after name and no valid version specifier)
    es-anonimization-core-lg==any

@albertotb
Copy link
Author

Sure, I'm using pip 24.0, which seems to work fine. I will report to the creator of the wheel to see if they can follow the naming conventions. The confusing part here is that with pip seems to work (at least in some versions), so the wheel mantainers may not have noticed that the naming is incorrect.

@albertotb
Copy link
Author

Looking at pip release notes maybe this is related to this issue pypa/pip#12063

It seems that starting with pip 24.1b1 the wheel I used as an example is no longer installable with pip https://pip.pypa.io/en/stable/news/#b1-2024-05-06

@jcorrie
Copy link

jcorrie commented Oct 27, 2024

I'm experiencing the same issue using uv pip to install a spacy model via hugging face. The url given by hugging face for the wheels file seems only (?) to provide "any" as the version number. Agreed with @albertotb that from the pip issue referenced it seems like this is probably something hugging face will need to update. I've open a new issue huggingface/huggingface_hub#2637

@albertotb
Copy link
Author

albertotb commented Oct 27, 2024

Yes, the workaround I'm using is to stick with pip to install those HuggingFace models and pin pip<=24.0. I guess you could also host a clone of such HuggingFacel models but with the correct naming. That is not ideal if they are being updated regularly, but it's probably fine for most models.

@jtauber
Copy link

jtauber commented Nov 9, 2024

can the wheel also be downloaded and renamed?

@albertotb
Copy link
Author

can the wheel also be downloaded and renamed?

Probably, although not an ideal solution. You would have to re-host it somewhere or pass it around, and you also miss any updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility with a specification or another tool
Projects
None yet
Development

No branches or pull requests

5 participants