data-setup icon indicating copy to clipboard operation
data-setup copied to clipboard

python 3.8.12 installation poses issues with M1

Open brunolajoie opened this issue 2 years ago • 7 comments

Can someone with M1 describes the error?

brunolajoie avatar Mar 29 '22 12:03 brunolajoie

this thread solves the issue by using python 3.8.13 for M1 Max / Pro https://lewagon-alumni.slack.com/archives/C015E0C601F/p1647521525595919

gmanchon avatar Mar 29 '22 12:03 gmanchon

Let's at least bumb to 3.8.13 everyone, and investigate if 3.9.xxx can be a good option for everyone too!

brunolajoie avatar Sep 20 '22 07:09 brunolajoie

Indeed 3.8.13 works without issues.

I've been on 3.9.13 on a fully native (= NO Rosetta at all) for about 1.5 months (including teaching/TAing with it), and I've had no issues so far. Obviously, we should probably test this properly before, but at least on my side, it's all good.

I've also been on the macOS Ventura Beta for about 2 weeks and all has been fine, so I'm hoping we'll have no issues with students on Ventura!

@brunolajoie @gmanchon

Bruncky avatar Sep 20 '22 09:09 Bruncky

@Bruncky I'm having a look at the setup, what install method did you use for tensorflow on this NO rosetta setup ?

gmanchon avatar Sep 20 '22 13:09 gmanchon

@gmanchon, simpler than I thought: all I did was install tensorflow-macos and tensorflow-metal for the GPU!

There's one big caveat: if a student installs the normal TF by accident, the env gets messed up beyond repair, and the only way to fix the situation is to completely delete and recreate the env from scratch. This is something I learned from @vtmoreau when he helped me with a ticket! A good solution is adding this to all of our requirements.txt on setup day:

tensorflow-macos<=2.8.0; sys_platform == 'darwin' and 'ARM' in platform_version
protobuf<=3.20.1; sys_platform == 'darwin' and 'ARM' in platform_version
tensorflow==2.9.1; sys_platform == 'darwin' and 'ARM' not in platform_version
tensorflow==2.9.1; sys_platform != 'darwin'

This will make sure that the correct version of TF gets installed on the correct machine architecture 😄

Bruncky avatar Sep 20 '22 13:09 Bruncky

@Bruncky same here 🎉 works fine with :

  • silicon terminal
  • python 3.10.6
  • tf-macos 2.10.0
  • tf-metal 0.6.0

gmanchon avatar Sep 20 '22 14:09 gmanchon

@gmanchon, this is great news then! If this works for all students it means a much easier setup for Apple Silicon people

Bruncky avatar Sep 20 '22 14:09 Bruncky

Fixed by https://github.com/lewagon/data-setup/pull/244

gmanchon avatar Oct 25 '22 07:10 gmanchon