pavlin-policar / openTSNE

Extensible, parallel implementations of t-SNE
https://opentsne.rtfd.io
BSD 3-Clause "New" or "Revised" License
1.45k stars 160 forks source link

Numpy incompatibility #213

Closed ll-portes closed 2 years ago

ll-portes commented 2 years ago

Hi guys,

I'm using openTSNE for the first time. However, it seems that openTSNE is not compatible with newer versions of Numpy. I don't know if that is an issue, or if I'm supposed to build it on my machine.

Actual behaviour

Get this message when importing anything from openTSNE:

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Steps to reproduce the behavior

Openning a Jupyter notebook and running the code: from openTSNE import TSNE

Remarks

  1. Numpy version 1.21.5 py39h7a5d4dd_2
  2. opentsne version 0.6.2 py39h79cecc1_0
  3. I read that openTSNE 0.6.2 is build with oldest-supported-numpy. Does it mean I should build it on my machine. I appologize if my rased issue is not really an issue.
xheon commented 2 years ago

Hi, I got the same issue. Clone the repo and building it locally resolved the issue for me.

pavlin-policar commented 2 years ago

I've seen this error before, but what usually ended up happening is that I installed openTSNE with one version of numpy, but then some package or other decided to up/downgrade numpy in the environment, causing the mismatch. Either way, locally building the package in whatever environment you have should definitely solve the problem.

I'll close for now, but please reopen if you have any further questions.