huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
131.96k stars 26.28k forks source link

transformers - installation #32886

Open jzaba123 opened 3 weeks ago

jzaba123 commented 3 weeks ago

Hello,

Going via the install and I see some issues

https://huggingface.co/docs/transformers/installation

A) PLATFORM WIN

pip install 'transformers[torch]'

ERROR: Invalid requirement: "'transformers[torch]'": Expected package name at the start of dependency specifier 'transformers[torch]'

pip install 'transformers[tf-cpu]'

ERROR: Invalid requirement: "'transformers[tf-cpu]'": Expected package name at the start of dependency specifier 'transformers[tf-cpu]'

pip install 'transformers[flax]'

ERROR: Invalid requirement: "'transformers[flax]'": Expected package name at the start of dependency specifier 'transformers[flax]'

CORRECT SHOULD BE

pip install "transformers[torch]"

pip install "transformers[tf-cpu]"

pip install "transformers[flax]"

B) pip install "transformers[tf-cpu]" DID NOT WORK

Failed to build tokenizers ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tokenizers)

https://huggingface.co/learn/nlp-course/en/chapter8/5 transformers-cli env

amyeroberts commented 3 weeks ago

Hi @jzaba123, thanks for raising this issue!

Would you like to open a PR to update the instructions to use "?

cc @Rocketknight1 regarding the TF-CPU install

Rocketknight1 commented 3 weeks ago

Hi @jzaba123, yes, thanks for the issue! pip install 'transformers[torch]' works on Linux but presumably not on Windows. Can you open a PR to fix it? The relevant file is installation.md