How to use specific version of python library which is only downloadable by pip + git command

I was using a model which depend on older model and I was suggested to install the library using this :
pip install soundfile git+https://github.com/facebookresearch/fairseq.git@b8ea8a9b72c82192da07e3377adf4ebbde16716d

I am not great in making spaces on hugging face and this is my first time therefore I don’t know how to use it in requirements.txt file and my pc is very weak and cant build whl files.

Please guide me how to use that particular version properly ?
Thank-you

1 Like
soundfile
git+https://github.com/facebookresearch/fairseq.git@b8ea8a9b72c82192da07e3377adf4ebbde16716d

requiements.txt only lists the commands to pass to pip install, so this should be fine in principle. However, in the case of older libraries, there may be cases where dependency errors occur that the author did not even anticipate. In such cases, you will probably need to specify the version of the library that causes the error through a process of trial and error.
The following is just an example.

numpy<2
torch<=2.4.0

Thankyou so much I will try it.
I wasn’t expecting so fast response.
I will share the project to you first if I succeed in making it.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.