AudioLDM2 icon indicating copy to clipboard operation
AudioLDM2 copied to clipboard

Installation and running error on M2 Mac

Open hoominchu opened this issue 2 years ago • 2 comments

I am trying to install the repo and get it running on my M2 Mac but get the following error.

OSError: dlopen(/opt/homebrew/anaconda3/lib/python3.11/site-packages/torchaudio/lib/libtorchaudio.so, 0x0006): Symbol not found: __ZN2at8internal15invoke_parallelExxxRKNSt3__18functionIFvxxEEE Referenced from: <F096D2C3-ADC0-3EF4-ACF6-E3075A1DF8EE> /opt/homebrew/anaconda3/lib/python3.11/site-packages/torchaudio/lib/libtorchaudio.so Expected in: <F444C1C4-7CAA-34AA-AA17-B5ED7975BD31> /opt/homebrew/anaconda3/lib/python3.11/site-packages/torch/lib/libtorch_cpu.dylib

I have tried both webapp and command line options but receiving the same error.

While trying to look for a solution, I came across this SO post which is sorta related and might help. https://stackoverflow.com/questions/73370909/m1-mac-returns-oserror-library-not-loaded

Posting it here in case someone found a solution already.

hoominchu avatar Aug 28 '23 11:08 hoominchu

Years of experience has taught me that anaconda won't work with home-brew. It't strongly recommended to install miniconda from the official installation package, and separate the entire development environment from home-brew. That is, while the programs and cask installed by brew (like YouTube-dl) uses the python@3 at /opt/homebrew/opt/[email protected]/libexec/bin, the interpreter that you directly use in your project is located in ~/miniconda3/envs/<ENV>/bin/python.

In a word, my suggestion for you is to delete your anaconda installation by brew uninstall, than install miniconda with the installer. Then you may create an env with python (v3.8 works for me) pytorch>=2.0.1(which supports mps) and torchaudio.

microboym avatar Aug 28 '23 12:08 microboym

Thanks, will try that and let you know!

hoominchu avatar Aug 29 '23 00:08 hoominchu