princeton-nlp / SimCSE

[EMNLP 2021] SimCSE: Simple Contrastive Learning of Sentence Embeddings https://arxiv.org/abs/2104.08821

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Subprocess-error related to numpy while installing via pip

poushalimukherjee opened this issue · comments

The following error comes up while trying to install "simcse" via pip:

"
error: legacy-install-failure

Encountered error while trying to install package.

numpy

note: This is an issue with the package mentioned above, not pip.
"

Hi,

It seems that you have some problem installing numpy? Maybe try pip install numpy. If this does not solve the problem, you can also just clone the project and install it by python setup.py install.

Hi,

I encountered the same error while trying to install the package in a Python 3.10 environment with both methods (pip install and python setup.py). The issue at this line which specifies numpy<1.20 which is very old.
So the solution for me was to remove this constraint (replace the above line with numpy>=1.19.5) and then install using python setup.py install. And that worked for me.
Hope this helps.

Stale issue message