System Configuration
Laptop: MacBook Pro with Apple M3
Operating System: macOS Sonoma 14.5
IDE: PyCharm
Python Versions Attempted: 3.10, 3.12, 3.7, 3.8 (note that many questions are showing solutions by simply installing python 3.8: it is not working).
Problem description
I am trying to install the Magenta Python package on my local machine using PyCharm, but I am facing multiple errors related to dependencies like numba
, llvmlite
, and python-rtmidi
. The key error messages include failures to build wheels and issues with specific versions of Python and dependencies.
Error with numba and llvmlite
Errors during the building wheel process for numba and llvmlite.
Example error message:
error: Command "clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -DNPY_INTERNAL_BUILD=1 ... failed with exit status 1
Magenta requires Python versions between 3.7 and 3.11 (note that in another error message, it is stated that it requites Python versions between 3.6 and 3.9).
Hence, initial attempts with Python 3.10 and 3.12 resulted in compatibility issues.
Steps Taken
- Installing Python 3.7 using pyenv
pyenv install 3.7.12
pyenv virtualenv 3.7.12 myenv
pyenv activate myenv
- Modified
setup.py
in Magenta repo to ensure compatibility with specific versions ofnumba
andpython-rtmidi
.
install_requires=[
'numba==0.56.4',
'python-rtmidi==1.4.9',
'tensorflow==2.13.0', # Changed from 2.9.1 to 2.13.0
# Other dependencies...
]
- Manual installation of dependencies before installing Magenta.
pip install numpy==1.21.6
pip install tensorflow==2.13.0
- Attempting to Install Magenta: despite these changes, installation still failed with errors related to building wheels for dependencies like
numpy
.
pip install .
Here, I got C/C++ Compilation Errors and I surrounded. They were errors with the clang compiler not supporting certain flags (-faltivec). Specific error during the installation of numpy related to the ARM64 architecture on macOS.
error: the clang compiler does not support 'faltivec', please use -maltivec and include altivec.h explicitly
Despite multiple attempts and various strategies to resolve dependency issues and compatibility problems, the installation of the Magenta package remains unsuccessful. The primary blockers are:
- Compatibility issues between
numpy
,numba
, and the ARM64 architecture on macOS. - Specific dependency requirements for Magenta that conflicted with available versions.
I would appreciate any guidance or solutions to successfully install the Magenta package on my system. If additional information or clarification is needed, please let me know.
Thank you!