How to use numpy with version >=1.20.1
Tim Yuan
0
Reputation points
I was trying to convert a workflow to Azure ML designer using mostly Execute Python script components and I got this exception:
---------- Start of error message from Python interpreter ----------
Got exception when invoking script: 'ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject'.
---------- End of error message from Python interpreter ----------
It seems the workflow requires numpy version >= 1.20.1 while designer requires an older version. I have tried to use os.system("pip install upgrade numpy") but the workflow still uses numpy version 1.19.1 after the upgrade. I have also tried importlib.reload(numpy) after the upgrade and got this exception:
---------- Start of error message from Python interpreter ----------
Got exception when invoking script: 'ImportError: cannot import name '_CopyMode' from 'numpy._globals' (/azureml-envs/azureml_8f317849db35f281450cf74333640b98/lib/python3.8/site-packages/numpy/_globals.py)'.
---------- End of error message from Python interpreter ----------
Does this mean designer is incompatible with numpy version >= 1.20.1 or is there any way around it?
Sign in to answer