mycroft-precise icon indicating copy to clipboard operation
mycroft-precise copied to clipboard

Error compiled against API version 0xc but this version of numpy is 0xb

Open guyluz11 opened this issue 5 years ago • 4 comments

Running mycroft-precise.listen hey-mycroft-2.pb return error

To Reproduce Steps to reproduce the behavior:

  1. Install the mycroft-precise snap from the snapcraft.io or create the snap yourself from this repo and install it.
  2. Downloaded model from https://github.com/MycroftAI/precise-data/tree/models
  3. Run this mycroft-precise.listen on one of the models mycroft-precise.listen hey-mycroft-2.pb

Expected behavior Mycroft will listen to the word hey mycroft and will exit.

Console error

$  mycroft-precise.listen hey-mycroft-2.pb 
Testing for explicit PulseAudio choice...
...and PulseAudio has been explicitly chosen, so using it.
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core.umath failed to import
ImportError: numpy.core.umath failed to import
2020-12-15 23:26:50.430420: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr 
Aborted (core dumped)

Environment:

  • Device type: [desktop]
  • OS: [Kubuntu]
  • mycroft-precise version: [0.3.0]

guyluz11 avatar Dec 15 '20 21:12 guyluz11

Per https://github.com/tensorflow/profiler-ui/issues/10#issuecomment-472088484 (and other places) this can be fixed by installing an updated numpy version.

el-tocino avatar Jan 02 '21 22:01 el-tocino

Hey there, thanks for trying out the Snap, but sad to hear it didn't work for you.

If you do want to use the Snap specifically, you can clone this repo and try tweaking the dependencies as eltocino suggested.

The snapcraft configuration should respect anything in the standard requirements.txt

If you haven't built a snap before, there's a few dependencies required but it's all quite automatic once you have the config defined. More details here: https://snapcraft.io/#python

krisgesling avatar Jan 04 '21 00:01 krisgesling

One other note on this, we will be looking at shifting precise to use tflite by default - there's an existing PR for this. Will do an update of other requirements at the same time.

krisgesling avatar Jan 04 '21 00:01 krisgesling

I have changed numpy version in the requirements.txt to 1.19.4 and created the snap but got the same error.

Testing for explicit PulseAudio choice...
...and PulseAudio has been explicitly chosen, so using it.
RuntimeError: module compiled against API version 0xc but this version of numpy is 0xb
ImportError: numpy.core.multiarray failed to import
ImportError: numpy.core.umath failed to import
ImportError: numpy.core.umath failed to import
2021-01-04 17:50:26.109915: F tensorflow/python/lib/core/bfloat16.cc:675] Check failed: PyBfloat16_Type.tp_base != nullptr 
Aborted (core dumped)

I am happy to heare that we will move to tflite and hope that it will be resolve with the move.

guyluz11 avatar Jan 04 '21 17:01 guyluz11