princeton-nlp / SimCSE

[EMNLP 2021] SimCSE: Simple Contrastive Learning of Sentence Embeddings https://arxiv.org/abs/2104.08821
MIT License
3.31k stars 502 forks source link

Support python 3.10 (current Google Colab runtime) #248

Closed mocobeta closed 11 months ago

mocobeta commented 1 year ago

I found simcse package can't be installed on Google Colab.

The problem is that the current Google Colab runtime is Python 3.10 that does not support old SciPy and NumPy.

$ python -V
Python 3.10.12

$ pip install simcse
...
Collecting scipy<1.6,>=1.5.4 (from simcse)
  Using cached scipy-1.5.4.tar.gz (25.2 MB)
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I don't see any problems with Python 3.9, so I guess something was changed in Python 3.10. I'm wondering if it is possible to upgrade SciPy and NumPy dependencies so that users can run SimCSE on the latest python (and Google Colab).

github-actions[bot] commented 1 year ago

Stale issue message

gaotianyu1350 commented 1 year ago

Hi,

You can upgrade scipy and numpy to the latest version according to your need. I believe those won't affect the main functions of SimCSE.

github-actions[bot] commented 11 months ago

Stale issue message

NorahUseringithub commented 10 months ago

the same issue I have

xiayouran commented 8 months ago

directly install it from code,in setup.py

image

then python setup.py install