question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ARM 64bit - Failed to initialize NumPy: module compiled against API version 0xe but this version of numpy is 0xd

See original GitHub issue

🐛 Description

I wanted to do some testing on Raspberry Pi OS Bullseye 64bit and encountered a dependency problem with Numpy 1.19.5. After successful cloning and building the 0.5.0 version running ‘tts’ gives the error:

UserWarning: Failed to initialize NumPy: module compiled against API version 0xe but this version of numpy is 0xd (Triggered internally at  /root/pytorch/torch/csrc/utils/tensor_numpy.cpp:68.)

This seems to be related to an incompatibility between Numpy 1.19.5 and Torch 1.10.1, 1.9.0 and 1.8.1 (all I could try).

I tried upgrading Numpy: pip install numpy --upgrade which will install Numpy 1.22.0, but break everything else since the Numpy 1.19.5 dependency seems to be very strict.

To Reproduce

  • Install Raspberry Pi OS Bullseye 64bit
  • Install Python and some dependencies. I had to run something like: sudo apt-get install python3-venv libatlas-base-dev llvm-9 libmecab-dev and set sudo ln -s /usr/bin/llvm-config-9 /usr/bin/llvm-config (not sure if llvm is actually required but I needed it when I played with YourTTS)
  • Create virtual env: python3 -m venv env && source env/bin/activate
  • Clone the repo: git clone https://github.com/coqui-ai/TTS
  • Build: cd TTS && pip install -e .
  • Try something simple like: tts --list_models

Expected behavior

All dependencies resolve properly and TTS works.

Environment

  • 🐸TTS Version: 0.5.0
  • PyTorch Version: 1.10.1
  • Python version: 3.9.2
  • OS: Raspberry Pi OS 64bit (Aarch64), Kernel: 5.10.63-v8+
  • CUDA/cuDNN version: -
  • How you installed PyTorch (conda, pip, source): pip

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jbroecklingcommented, Jan 29, 2022

Did you downgrade from 3.9? I usually find it pretty troublesome on Pi to use a different version than the default.

yea, but for another reason. I just made a Python 3.9 venv and installing TTS with numpy==1.22.1 works and gives me better results. Downgrading Python is not recommended, cause it makes more trouble 😄

0reactions
fquirincommented, Jan 27, 2022

installed numpy==1.21.5 and the issue is gone (and till now, nothing else broke down)

nice.

I was using Python 3.7.11

Did you downgrade from 3.9? I usually find it pretty troublesome on Pi to use a different version than the default.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to initialize NumPy: module compiled against API ...
UserWarning : Failed to initialize NumPy: module compiled against API version 0xf but this version of numpy is 0xe (Triggered internally at.
Read more >
failed to initialize numpy: module compiled against api version ...
I'm using Windows 10 64 bit, Python 3.10.5, and as far as I can tell I've installed all dependencies including Visual Studio Code...
Read more >
module compiled against API version 0xe but this version of ...
Hello, I switched from a standard, CPU environment in GDC to one with a few GPUs. Now, I'm getting the following error. RuntimeError:...
Read more >
RuntimeError: module compiled against API version 0xe but ...
I'm getting this error when I try to start assign3.1.0 on Ubuntu 20.22 ... compiled against API version 0xe but this version of...
Read more >
llvm version 11 and librosa error - Raspberry Pi Stack Exchange
RuntimeError : module compiled against API version 0xf but this version of numpy is 0xe and ImportError: numpy.core.multiarray failed to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found