Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Kernel crashes anytime ! #45

Open
jmbernabotto opened this issue Nov 29, 2020 · 18 comments
Open

Kernel crashes anytime ! #45

jmbernabotto opened this issue Nov 29, 2020 · 18 comments

Comments

@jmbernabotto
Copy link

I installed tensorflow in my new Mac mini M1.
I followed instructions to make new environnement...
But with Jupyter when I try "import tensorflow", I have a kernel crash systematically !
Please help me.

Thanks.

@leach-mrt
Copy link

leach-mrt commented Nov 30, 2020

I also met the same problen in my new MacBook Pro M1, but run python script w/o jupyter-notebook is fine.

@jmbernabotto
Copy link
Author

I also met the same problen in my new MacBook Pro M1, but run python script w/o jupyter-notebook is fine.

I also tried this way but same issue !

@LeonardoAlchieri
Copy link

LeonardoAlchieri commented Nov 30, 2020

Since there are other issues open about Jupyter on Intel Macs as well, I believe it may be some bug related to the use of the Metal Shaders with the ipython kernel.

@anna-tikhonova
Copy link
Collaborator

Thank you for reporting this issue! It would be very helpful, if you could provide a reproducible test case, so we can investigate this failure.

@jmbernabotto
Copy link
Author

jmbernabotto commented Dec 1, 2020 via email

@pooyadavoodi
Copy link
Collaborator

@jmbernabotto I wasn't able to reproduce the issue. Jupyter seems to be working for me.

Perhaps this is due to some installation issue?

Have you installed python from Xcode Command Line Tools as mentioned in the readme file?
I've noticed only this version of python have be used to create any virtual environment or to install pip packages.

@jmbernabotto
Copy link
Author

@jmbernabotto I wasn't able to reproduce the issue. Jupyter seems to be working for me.

Perhaps this is due to some installation issue?

Have you installed python from Xcode Command Line Tools as mentioned in the readme file?
I've noticed only this version of python have be used to create any virtual environment or to install pip packages.

Yes I have installed Python from Xcode.
No solution for me 👎 so disappointed...

@jmbernabotto
Copy link
Author

jmbernabotto commented Dec 11, 2020 via email

@hoytak
Copy link
Collaborator

hoytak commented Dec 11, 2020

Ipython requires the latest version of appnope (pip install --upgrade appnope) to work correctly on M1. However, I do not think that is the issue here.

First, could you verify that outside of your virtual environment, running which python points to the Python version installed by the command line tools. If it doesn't, then run the install script using --python=/Library/Developer/CommandLineTools/usr/bin/python3 to force it to use the command line tools version.

If that doesn't work, send me the output of file $(which python) while in your virtual environment. There are two cpu subtypes for binaries on the M1, arm64 and arm64e. Trying to mix the two results in the error you see. For this pre-release version, we're focusing support on the arm64 version of Python in the Xcode Command Line Tools, so the included wheel does not include an arm64e slice.

@jmbernabotto
Copy link
Author

I don't test yet

@Yueqi-19
Copy link

me too, so disappointed! when i try to import TensorFlow, it always showed 'kernel appears to have died. It will restart automatically'

@jisho-iemoto
Copy link

Me, too! I'm very looking forward to find how fast my machine works, but I haven't seen it yet, only the 'kernel crash' notice instead :<

@dhoelzer
Copy link

Random crashes during training several epochs in.

@MegansColorado
Copy link

Ipython requires the latest version of appnope (pip install --upgrade appnope) to work correctly on M1. However, I do not think that is the issue here.

First, could you verify that outside of your virtual environment, running which python points to the Python version installed by the command line tools. If it doesn't, then run the install script using --python=/Library/Developer/CommandLineTools/usr/bin/python3 to force it to use the command line tools version.

If that doesn't work, send me the output of file $(which python) while in your virtual environment. There are two cpu subtypes for binaries on the M1, arm64 and arm64e. Trying to mix the two results in the error you see. For this pre-release version, we're focusing support on the arm64 version of Python in the Xcode Command Line Tools, so the included wheel does not include an arm64e slice.


Having same issue. When I do this line --python=/Library/Developer/CommandLineTools/usr/bin/python3 I get '-bash: --python=/Library/Developer/CommandLineTools/usr/bin/python3: No such file or directory'

I did install from Command line.

When i do this line 'file $(which python)` i get '/Users/megan/opt/anaconda3/bin/python: Mach-O 64-bit executable x86_64'

Can you please help?

@dhoelzer
Copy link

I seem to be finding that every minor MacOS update requires me to reinstall the command line tools... Is it possible that you've allowed your Mac to do a minor update, which oddly results in the command line tools getting flushed?

@MegansColorado
Copy link

I seem to be finding that every minor MacOS update requires me to reinstall the command line tools... Is it possible that you've allowed your Mac to do a minor update, which oddly results in the command line tools getting flushed?

I just installed the latest command-line tools (that wasnt currently in beta) version 12.4 here: https://developer.apple.com/download/more/?=command%20line%20tools

@jmbernabotto
Copy link
Author

jmbernabotto commented Mar 17, 2021 via email

@sedwardsmarsh
Copy link

sedwardsmarsh commented Mar 26, 2021

Ipython requires the latest version of appnope (pip install --upgrade appnope) to work correctly on M1. However, I do not think that is the issue here.

First, could you verify that outside of your virtual environment, running which python points to the Python version installed by the command line tools. If it doesn't, then run the install script using --python=/Library/Developer/CommandLineTools/usr/bin/python3 to force it to use the command line tools version.

If that doesn't work, send me the output of file $(which python) while in your virtual environment. There are two cpu subtypes for binaries on the M1, arm64 and arm64e. Trying to mix the two results in the error you see. For this pre-release version, we're focusing support on the arm64 version of Python in the Xcode Command Line Tools, so the included wheel does not include an arm64e slice.

I found that passing --python = /usr/bin/python3 to the installation script worked and --python=/Library/Developer/CommandLineTools/usr/bin/python3 did not.

I go into further detail into the installation process I used in #215.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests