Re: [Mllab-23] Frage im eCampus: Tensorflow Error on ARM hardware
Hi, danke für's Schicken. Da bin ich leider auch überfragt. Was ich beim Recherchieren noch gefunden habe, ist, dass conda hier manchmal Probleme auf den MacBooks macht. Ich würde folgendes probieren: Sorry to hear this. Unfortunately, it's not so clear to us, how to solve this problem. Two possible ways to go are the following: 1. Reinstall the virutalenvironment using pip (not conda!): 1. Make sure you are using python3. 2. Either install virtualenv "sudo -H pip install virtualenv" or use pythons venv directly as mentioned in step 3. 3. Create a virtual environment via either "virtualenv .mllab" or "python3 -m venv .mllab" 4. Activate the environment by running "source .mllab/bin/activate" 5. Install packages via pip: "pip install tensorflow>=2.0 jupyter numpy scipy scikit-learn matplotlib pandas urllib3" 2. If reinstalling the environment via pip does not do it, I would suggest using colab for the tensorflow task instead. You will need to create (or login) a google account and then go to https://colab.research.google.com/ Here you can run your code in a new colab notebook. Kannst du die Antwort bitte ins Forum posten? Danke! Viele Grüße, Bastian Am 30.05.23 um 10:52 schrieb Arno Feiden:
s6masowa | s6masowa | 27. Mai 2023, 11:12 Tensorflow Error on ARM hardware I get the following Error when importing Tensorflow [CPU-Version] (others with Intel Hardware don't):
Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
I'm working on an MacBook with 2021 M1-Pro Apple Silicon Processor. (ARM - Architec.) The solutions I found online for this are mostly to downgrade to 2 years old outdated version to get it running. Is there any know way here to get it running properly?
-- Dr. Bastian Bohn Fraunhofer-Institut für Algorithmen und Wissenschaftliches Rechnen SCAI Abteilung Numerische Datenbasierte Vorhersage (NDV) Schloss Birlinghoven 53757 Sankt Augustin Tel.: +49 2241 14 4225 https://www.scai.fraunhofer.de/de/geschaeftsfelder/numerische-datenbasierte-...
Es kam eine Rückantwort. Für Dich zur Info: s6masowa | s6masowa | Heute, 09:20 Tensorflow Error on ARM hardware [Fix for ARM-Error] Thank you for your reply but sadly the method you described did not solve the problem for me. Never the less I got it running and would like to share my solution here for people with a similar problem. The described error appears if you emulating the x86 version of conda via rosetta on an ARM Mac. (Which happens automatically if you just installed Anaconda from the link provided on sheet 0.) To check if this is the case one can run: "conda config --show subdir" If the output says "osx-arm64" the problem probaly is something else but if it says "osx-64" one can try the following: First check if you have xcode installed. If not or not sure run: "xcode-select --install" in the terminal. Since the Anaconda Navigator GUI (as provided on sheet 0) in general only comes with the x86 version of conda, uninstall all conda versions and install miniconda (since miniconda comes with native ARM support for MAC). The sh-script for this can be found online. Note: sadly there is no GUI version of conda with native ARM support for Mac at the moment so we have to work with the terminal. After this check with "conda config --show subdir" that the platform is "osx-arm64" now. If succesfull we install tensorflow in the following way: Create an virtual env. using conda and activate it. To install tensoflow run: "conda install -c apple tensorflow-deps" "pip install tensorflow-macos" "pip install tensorflow-metal" (allows GPU acc. on Apple silicone hardware) One could maybe add the info to sheet 0 that the linked (Ana)conda version does not work for anything tensorflow related on mac from 2020 or newer. ----- Ursprüngliche Mail ----- Von: "Bastian Bohn" <bastian.bohn@scai.fraunhofer.de> An: "Arno Feiden" <arno.feiden@scai.fraunhofer.de> CC: "mllab-23" <mllab-23@ins.uni-bonn.de> Gesendet: Dienstag, 30. Mai 2023 11:15:20 Betreff: Re: [Mllab-23] Frage im eCampus: Tensorflow Error on ARM hardware Hi, danke für's Schicken. Da bin ich leider auch überfragt. Was ich beim Recherchieren noch gefunden habe, ist, dass conda hier manchmal Probleme auf den MacBooks macht. Ich würde folgendes probieren: Sorry to hear this. Unfortunately, it's not so clear to us, how to solve this problem. Two possible ways to go are the following: 1. Reinstall the virutalenvironment using pip (not conda!): 1. Make sure you are using python3. 2. Either install virtualenv "sudo -H pip install virtualenv" or use pythons venv directly as mentioned in step 3. 3. Create a virtual environment via either "virtualenv .mllab" or "python3 -m venv .mllab" 4. Activate the environment by running "source .mllab/bin/activate" 5. Install packages via pip: "pip install tensorflow>=2.0 jupyter numpy scipy scikit-learn matplotlib pandas urllib3" 2. If reinstalling the environment via pip does not do it, I would suggest using colab for the tensorflow task instead. You will need to create (or login) a google account and then go to [ https://colab.research.google.com/ | https://colab.research.google.com/ ] Here you can run your code in a new colab notebook. Kannst du die Antwort bitte ins Forum posten? Danke! Viele Grüße, Bastian Am 30.05.23 um 10:52 schrieb Arno Feiden: s6masowa | s6masowa | 27. Mai 2023, 11:12 Tensorflow Error on ARM hardware I get the following Error when importing Tensorflow [CPU-Version] (others with Intel Hardware don't): Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions. I'm working on an MacBook with 2021 M1-Pro Apple Silicon Processor. (ARM - Architec.) The solutions I found online for this are mostly to downgrade to 2 years old outdated version to get it running. Is there any know way here to get it running properly? -- Dr. Bastian Bohn Fraunhofer-Institut für Algorithmen und Wissenschaftliches Rechnen SCAI Abteilung Numerische Datenbasierte Vorhersage (NDV) Schloss Birlinghoven 53757 Sankt Augustin Tel.: +49 2241 14 4225 [ https://www.scai.fraunhofer.de/de/geschaeftsfelder/numerische-datenbasierte-... | https://www.scai.fraunhofer.de/de/geschaeftsfelder/numerische-datenbasierte-... ] -- Mllab-23 mailing list Mllab-23@ins.uni-bonn.de https://mailman.ins.uni-bonn.de/mailman/listinfo/mllab-23
participants (2)
-
Bastian Bohn -
Sara Hahner