New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installation on apple silicon (M1) #1573
Comments
Hi @antic11d Thanks for the report. Our build process for M1 mac is unstable right now. Could you confirm that you can install PyTorch? @seemethere @malfet could you take a look at it? |
Hi @mthrok, Yes, I can install PyTorch. :) |
@antic11d Thanks for the confirmation. Can you try installing It might take a while for us to fix binary build, but I think there is a good chance that you can simply build it. |
I gave it a try, this is the error I get:
Any hint for a potential fix? 😊 |
@antic11d I have never seen this error , so I do not have an definitive answer but there is a similar error reported numpy/numpy#14165 (comment) This might be something specific to M1 Mac |
Symlink definitely helped, but there is one more error...
Does this one maybe look familiar? :) |
Somewhat yes. Are you using nightly build of PyTorch? C++-related stuff are often updated in PyTorch, so this kind of error arises when using old (or the last stable release) version of PyTorch. |
@antic11d can you please run |
Hi @malfet, here's the output:
Also, trying to build without the obsolete flag gives this error:
|
@antic11d since you've installed PyTorch-1.8.0 you need to build torchauio from https://github.com/pytorch/audio/tree/release/0.8, which can be cloned by running something like:
|
@malfet
|
Could you be so kind a quickly post how exactly you symlinked? I unfortunately can't get it working. Thanks in advance! |
Hi @suissemaxx, As far as I remember, the command I used was ln -s /Users/dimi/miniforge3/envs/compression/lib/libopenblas.0.dylib /Users/dimi/miniforge3/envs/compression/lib/libopenblas.dylib Where, of course, you should change the paths to your environment. @malfet Sorry for the spam, but is there any fix for the problem I listed up there? We could really use some help, seems I am not alone. 😂 |
@antic11d Thanks, Dimitrije! Appreciate your help! 👍 @malfet I second @antic11d's request for a solution. It would be superhelpful to be able to install torchaudio along pytorch et al. Thanks in advance for any help or hint you can give us.
|
As of PyTorch-1.9 releases TorchAudio builds should be available for both aarch64 and M1 Can you please try running
And let me know whether it works for you |
Hi @malfet, |
Thanks @malfet! |
Closing the issue. Thanks for the report @antic11d @suissemaxx |
Works for me too now! Thanks a lot! 👍 |
Thanks lot. |
this is working with PIP but not with Miniconda... which, as far as I know, is still the preferred way running Python on M1? How do we get this fixed? |
@rcoenen yes, it's frustrating... but I think I managed to make it work: check this out, https://anaconda.org/ngam/torchaudio Let me know if you test it and something fails --- I had to suppress a few things (e.g. the intel mlk library) in the build conda install torchaudio -c ngam |
@ngam Could you help to build with python 3.8? |
Thank you for the reminder. M1 torchaudio builds are not yet automated, so those kinds of mishaps are unfortunate. Will post an update when new builds will become available. |
thank you for this modification! |
It seems the ngam torchaudio doesn't work.
|
NB: what I have in my python/lib folder is libprotobuf.30.dylib. |
@divideconcept ngam is not our release so you need to check with the ngam package publisher. It seems that when they built torchaudio, some extra dependencies were introduced, which suggests that it was not build on the PyTorch you have in your env. |
@mthrok do you plan to officially have an osx-arm64 build of torchaudio for conda ? |
PS: installing pytorch+torchvision via conda and then installing torchaudio via pip doesn't work either
Then when I run python and try to import torchaudio I get the following error:
|
IIRC, Only Python 3.9 is supported by PyTorch on M1 mac. And the last time I checked miniforge 3 is the only Anaconda variant distribution that work natively on M1 mac. UPDATE Now Anaconda has native M1 distribution: https://www.anaconda.com/products/distribution#Downloads Installing Miniforge3 and simply
You need to make sure that the matching package is installed. |
@divideconcept sorry. I haven't updated that in a while. I could look at it again if you want me to, but I personally have started using the pypi version as @mthrok points out. I can potentially rebuild torchaudio if you really need it --- we haven't had luck building it in conda-forge yet (you're welcome to try: conda-forge/staged-recipes) |
@ngam Thanks but don't worry, I'll just use the x86_64 version for now, until the PyTorch team can provide an official arm conda package. |
|
Thanks for the update Stanley!
orchaudio/lib/libtorchaudio_sox.so, 0x0006): Library not loaded |
❓ Questions and Help
Hi, is there a possibility of installing this package on the Apple M1 machine? Since the installation fails for me from both pip and conda.
Thanks!
The text was updated successfully, but these errors were encountered: