Open utterances-bot opened 3 years ago
Thank you for the post!
I think it should be /bin/bash Miniforge3-MacOSX-x86_64.sh -p /Users/$(whoami)/miniforge_x86_64
. Notice the .sh
.
@sayakpaul You are definitely right. I will fix it in an instant.
Thanks man!! really helpful
Hi there, thanks a lot for the tutorial. i followed it to a success and installed torch and torchvision. I'm facing a problem that when i start the training of a network my jupiter notebook kernel just dies right away. Is that anything you may have faced before? i'd appreciate any help! thanks :)
I am not sure if conda install -y python=3.8
in item 2 for Rosetta 2 emulation is correct as of May 2021. Running this command installs osx-arm64
version of python which ends up causing osx-64
packages giving wrong architecture error during install.
@tackoo The tutorial is based on conda 4.9.2 (x86). However I was able to check that the same procedure installs x86 version of python 3.8 just as intended with conda 4.10.1 (latest) as well.
conda
that is called here should be x86 version of miniforge, not the ASi version installed on the first part. To ensure this, check if the content of ~/.zshrc
or ~/.bash_profile
file correctly calling conda from /Users/$(whoami)/miniforge3_x86_64
directory.
@rotemrevivo91 Unfortunately, I haven't faced any similar issue. My guess is that
You should be very careful when using conda, since in our setup, there are two different version, each called by exactly the same command: conda
. Even though you installed x86 conda, you might have called M1 conda by not refreshing the $PATH
environment. To do so, you need to run source ~/.bash_profile
(or source ~/.zshrc
if you updated your terminal to zsh) or start a new terminal session.
My (stupid but effective) recommendation for people not familiar with this is to close and re-open every terminal windows (of correct architecture) every time you install something to make sure you are using the correct one.
edit: typo
Hi @naturale0 thank for your answer. I was able to find a solution to my problem. It is something that is not an m1 specific problem and you tutorial is working really well! The problem occured when trying to run specific networks, for some other models no error happened and the kernal didn't die. I did the following to solve my issue:
conda install nomkl
which is a package that toggles the use of different build variant configurations in an environment. Unfortunately this did not work.import os
os.environ['KMP_DUPLICATE_LIB_OK']='True'
Which worked for my case! I hope this will help to anyone facing the same issue.
@rotemrevivo91 Glad you solved it. Thanks for sharing the solution!
Thanks for your answer @naturale0. I think it depends on whether you initialize Conda after installing ASi version. If you initialize it, the terminal window you open for installing Rosetta2 version will still include ASi conda initialization parameters. And I think this causes all conda
commands to still use osx-arm64
version.
I'm having problems with this in the step to add to ipykernel.
Could you please give a hand?
ImportError: dlopen(/Users/ryojikn/.local/lib/python3.8/site-packages/zmq/libzmq.cpython-38-darwin.so, 10): no suitable image found. Did find: /Users/ryojikn/.local/lib/python3.8/site-packages/zmq/libzmq.cpython-38-darwin.so: mach-o, but wrong architecture /Users/ryojikn/.local/lib/python3.8/site-packages/zmq/libzmq.cpython-38-darwin.so: mach-o, but wrong architecture
Dear @Ryojikn,
I am not an expert neither, but it seems that the architecture of python and package does not match. If you are running python for ARM64, then all the packages should also be built for ARM64 and vice versa. Please check if the package zmq
and python session that is running are based on the same architecture.
I only needed Pytorch so I have followed step 1 under 'Install PyTorch for x86_64 (Rosetta 2)'. However, when I try to run 'conda' zsh is not recognizing the command. What's the right way to add the path to zsh so that it gets detected?
Ideally, I would like to run the x86 miniforge using a descriptive alias like 'condaintel'. How can I do this for zsh?
I do not need ternsor flow right now so I have only done:
That is it.
As a follow up to my comment, I also want to add that I have python 3.9.5 and homebrew 3.2.1 installed on my macbook. Will that affect things?
Setting up M1 Mac for both TensorFlow and PyTorch | De Novo
Macs with ARM64-based M1 chip, launched shortly after Apple’s initial announcement of their plan to migrate to Apple Silicon, got quite a lot of attention bo...
https://naturale0.github.io/machine%20learning/setting-up-m1-mac-for-both-tensorflow-and-pytorch