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 setsudo 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:
- Created 2 years ago
- Reactions:1
- Comments:9 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 😄
nice.
Did you downgrade from 3.9? I usually find it pretty troublesome on Pi to use a different version than the default.