0

I have been trying to use stable_baselines on my new m1 chip computer; however, after installing all of the packages from some sample code I found, I kept getting this error

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

I know this is something that is fixed in numpy >= 1.20; however tensorflow requires 1.19.5; any suggestions on a workaround for this?

Here is the full error log:

File "/opt/homebrew/lib/python3.9/site-packages/stable_baselines/__init__.py", line 4, in <module>
 from stable_baselines.a2c import A2C
File "/opt/homebrew/lib/python3.9/site-packages/stable_baselines/a2c/__init__.py", line 1, in <module>
 from stable_baselines.a2c.a2c import A2C
File "/opt/homebrew/lib/python3.9/site-packages/stable_baselines/a2c/a2c.py", line 5, in <module>
 import tensorflow as tf
File "/opt/homebrew/lib/python3.9/site-packages/tensorflow/__init__.py", line 41, in <module>
 from tensorflow.python.tools import module_util as _module_util
File "/opt/homebrew/lib/python3.9/site-packages/tensorflow/python/__init__.py", line 48, in <module>
 from tensorflow.python import keras
File "/opt/homebrew/lib/python3.9/site-packages/tensorflow/python/keras/__init__.py", line 25, in <module>
 from tensorflow.python.keras import models
File "/opt/homebrew/lib/python3.9/site-packages/tensorflow/python/keras/models.py", line 22, in <module>
 from tensorflow.python.keras.engine import functional
File "/opt/homebrew/lib/python3.9/site-packages/tensorflow/python/keras/engine/functional.py", line 32, in <module>
 from tensorflow.python.keras.engine import training as training_lib
File "/opt/homebrew/lib/python3.9/site-packages/tensorflow/python/keras/engine/training.py", line 50, in <module>
 from tensorflow.python.keras.saving import hdf5_format
File "/opt/homebrew/lib/python3.9/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 37, in <module>
 import h5py
File "/Users/josephnordling/venv/lib/python3.9/site-packages/h5py/__init__.py", line 25, in <module>
 from . import _errors
File "h5py/_errors.pyx", line 1, in init h5py._errors
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
Joe Nordling
  • 73
  • 1
  • 8

0 Answers0