Unable to pip install -U sentence-transformers
Asked Answered
T

3

5

I am unable to do: pip install -U sentence-transformers. I get this message on Anaconda Prompt: ERROR: Could not find a version that satisfies the requirement torch>=1.0.1 (from sentence-transformers) (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2) ERROR: No matching distribution found for torch>=1.0.1 (from sentence-transformers) Can someone help?

Turrell answered 25/5, 2020 at 0:14 Comment(0)
T
9

I tried to Conda Install pytorch and then installed Sentence Transformer by doing these steps:

  1. conda install pytorch torchvision cudatoolkit=10.0 -c pytorch

  2. pip install -U sentence-transformers

This worked. Thanks

Turrell answered 25/5, 2020 at 14:9 Comment(1)
Thanks for your answer. But any idea why torch under sentence-transformers had a dependency on cudatoolkit and pytorch?Kulak
G
4

The other answers weren't working for me even though I saw them working for others on other message boards. This did work for me though.

  1. pip install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
  2. pip install -U sentence-transformers
Graciagracie answered 7/10, 2020 at 2:25 Comment(0)
A
-1

Maybe try pip3? That might be why it says that it can't find a version.

Aimo answered 25/5, 2020 at 0:17 Comment(5)
I have pip version pip 20.0.2. Are you saying there is a problem with the latest version?Turrell
instead of typing pip install you could try pip3 installAimo
Thanks for the suggestion. But that does not work either. I get this message: 'pip3' is not recognized as an internal or external command, operable program or batch file.Turrell
Ok, Im sorry, :(Aimo
Thank you for your answers Chris, Sam. I apologize for not acknowledging your help sooner.Turrell

© 2022 - 2024 — McMap. All rights reserved.