Open Jiankai-Sun opened 7 years ago
That sounds like some kind of issue with pytorch - there might be some difference in the conditions that makes it happen, but Jupyter's not doing anything special with that code - it's just sending it to Python to run.
I have the same issue, i can start running python or ipython on the term and then import torch, but i can not import pytorch in jupyter...
There may be some difference in the environment variables, or pytorch might be detecting that it's running in a Jupyter kernel and doing something different.
PyTorch has several open issues that mention Jupyter, including https://github.com/pytorch/pytorch/issues/2339. Please follow up there. You're more likely to find people who can help you there.
this can be closed. if you install the latest binaries with instructions from http://pytorch.org this issue will be fixed now.
Sorry for the trouble.
@soumith
i update the latest version of pytorch
Question1:it worked well in jupyter just before i update pytorch . and then it occurs "kernel died restarting" in jupyter also...... the problem description is here
Question2:before i update pytorch,import torch
runs well in spyder. but now
Question3:it breaks down also in the terminal.
the problem occurs in net.forward(input)
and gdb information: anyerror in the kernel of latest version??
@selous123 can you paste the code that gave a segfault in the terminal?
@soumith
thank you for your answering
Later,I update all the packages in anaconda
conda update --all
delightedly Question1 and Question3 have been solved
but the error in the spyder also exists
just import torch
will raise a problem
configuration of my system can be found in the stackoverflow ,including the code also
I have the same issue. I followed the same steps as posted by selous123 and with it crashed as per below: I hope this gets resolved soom
Clive
Adding to my comments above: Struggling away with pytorch 0.2.0. I am trying to run a Udemy deeplearning project on ubuntu 16.04 x64. Surprisingly enough the same project runs well on a Windows 10 laptop with an earlier version of pytorch on a conda python 3.5 env. So I created a conda python 3.5 env on ubuntu laptop to run things like tensorflow, pytorch, etc. My problem is that after loading torch (import torch) at the top of my Python script, as soon as the script reaches the part where torch is enabled (torch.nn in this case) the script crashes, killing the kernel. I discovered that in a python window, i could "import torch" but when I do a torch.rand(4) as an example, i get an "illegal instruction, core dumped" so this is what is killing my script. I have a screenshot of this which I am attaching to this post. I hope this makes sense to any of the developers who are involved in the pytorch 0.2.0 project.
@clived2 I've followed up with you here: https://discuss.pytorch.org/t/pytorch-0-2-0-python-3-5-issue-which-seems-quite-common/7288 and let's discuss there.
hi there
I am actually running this on a desktop Ubuntu 16.04 x64 desktop running Python 3.6. but I did up to a day ago run my script in a PY35 env on the same computer and the results were the same. Here is the display of cat/proccpuinfo :slight_smile: clived@UbuntuGnome2:~$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel® Pentium® Dual CPU E2140 @ 1.60GHz stepping : 13 microcode : 0xa1 cpu MHz : 1200.000 cache size : 1024 KB physical id : 0 siblings : 2 core id : 0 cpu cores : 2 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm bugs : bogomips : 3189.63 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel® Pentium® Dual CPU E2140 @ 1.60GHz stepping : 13 microcode : 0xa1 cpu MHz : 1200.000 cache size : 1024 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm bugs : bogomips : 3189.63 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management:
This computer does seem to support SSE.SSE2 and SSE3 but not SSE4. Both are older machines running I686 cpus I hope this helps and thanks for your response
Clive
I had this issue almost for 1 year and since my installation/libraries/... were a real mess I suppose it's something wrong with python installation --> I kinda solve this problem by simply opening jupyter twice! so "jupyter notebook" and again "jupyter notebook" and it was working fine. Yesterday I totally purged Python, Anaconda and everything related to python and installed a fresh one. To my surprise, the Problem is still there!! Even after reinstalling everything I need to open jupyter twice!
Python 3.6.2 | Windows 7 64-bit
I had the same experience on both of my two older Ubuntu boxes (686 cpus) and even on a brand new Win10 laptop. The Pytorch guys suggested removing the current Pytorch installation and re-install from source. One of the guys (Quant Scientist I think) has a script which offers a Torch installation from source , so I ran it on all three boxes (2 Ubuntu and 1 Win 10 ) and it worked fine. The script is on the PyTorch page
Good luck
On Thu, Sep 28, 2017 at 4:58 AM, Naviden notifications@github.com wrote:
I had this issue almost for 1 year and since my installation/libraries/... were a real mess I suppose it's something wrong with python installation --> I kinda solve this problem by simply opening jupyter twice! so "jupyter notebook" and again "jupyter notebook" and it was working fine. Yesterday I totally purged Python, Anaconda and everything related to python and installed a fresh one. To my surprise, the Problem is still there!! Even after reinstalling everything I need to open jupyter twice!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jupyter/notebook/issues/2784#issuecomment-332774021, or mute the thread https://github.com/notifications/unsubscribe-auth/ALBz71qpFpXjfOLs2VseyVQj6GnONQlYks5sm1-qgaJpZM4O8ivt .
-- Clive DaSilva CPA,CMA Home: 416-421-2480|Mobile: 416-560-8820 Email: clive.dasilva@gmail.com LinkedIN: http://ca.linkedin.com/pub/clive-dasilva/3/197/b89
I have the same issue, not only with PyTorch but also with Keras. For pytorch uninstalling and purging all from the virtualenv and reinstalling torch from the latest GPU wheel file worked, for keras I'm still finding out what to do. As information, both (pytorch and keras) worked correctly from the console python and console ipython
Python 3.5 Ubuntu 16.04 latest pytorch wheel of today
As a side-note, might have to do with GPU initialization? I had another issue with nengo-gui when initializing it with the tensorflow-gpu, this seemed like an issue during GPU initialization process in the during import statements
I had this issue when i tried to use it on WSL only if i installed pytorch using conda. When i used pip to install it worked perfectly !
Its been a while since I made the initial post, but as far as I can remember, my solution was to compile PyTorch from Source. On the PyTorch webpage, one of the guys had a script which made the process easier. It worked for me, as it was pointed out that the two Ubuntu boxes I was using were kinda old.
My two bits
On Sun, Dec 3, 2017 at 11:59 PM, Nitin Kishore Sai Samala < notifications@github.com> wrote:
I had this issue when i tried to use it on WSL only if i installed pytorch using conda. When i used pip to install it worked perfectly !
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jupyter/notebook/issues/2784#issuecomment-348860986, or mute the thread https://github.com/notifications/unsubscribe-auth/ALBz76MkT2sbzb5ZngAKDvbDNeJCjWv1ks5s83w8gaJpZM4O8ivt .
-- Clive DaSilva CPA,CMA Home: 416-421-2480|Mobile: 416-560-8820 Email: clive.dasilva@gmail.com LinkedIN: http://ca.linkedin.com/pub/clive-dasilva/3/197/b89
I have similar problem with CPU version, is anybody found solution to it?
I am facing similar problem while using fastai library based on pytorch with cpu only. Anybody found solution?
× having same kind of error. Dead kernel The kernel has died, and the automatic restart has failed. It is possible the kernel cannot be restarted. If you are not able to restart the kernel, you will still be able to save the notebook, but running code will no longer work until the notebook is reopened.
Just know I got this error while I was googling the same issue . Some one suggested to upgrade numpy package . !pip install numpy --upgrade . After this command my jupyter notebook is working fine . I am running CNN models
Thanks Raghu, Ill give it a shot
On Wed, Sep 18, 2019 at 9:52 PM Raghu Ram Arza notifications@github.com wrote:
Just know I got this error while I was googling the same issue . Some one suggested to upgrade numpy package . !pip install numpy --upgrade . After this command my jupyter notebook is working fine . I am running CNN models
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jupyter/notebook/issues/2784?email_source=notifications&email_token=ACYHH33KYHYFSQXOE3ZRLQTQKLLMRA5CNFSM4DXSFPW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7B6GXI#issuecomment-532931421, or mute the thread https://github.com/notifications/unsubscribe-auth/ACYHH3367NKIU2YSOPUSWS3QKLLMRANCNFSM4DXSFPWQ .
-- Clive DaSilva CPA,CMA Home: 416-421-2480|Mobile: 416-560-8820 Email: clive.dasilva@gmail.com LinkedIN: http://ca.linkedin.com/pub/clive-dasilva/3/197/b89
Hello Raghu, gave it a try, did mot work for me though. Just saying
On Wed, Sep 18, 2019 at 10:54 PM Clive Dasilva clive.dasilva@gmail.com wrote:
Thanks Raghu, Ill give it a shot
On Wed, Sep 18, 2019 at 9:52 PM Raghu Ram Arza notifications@github.com wrote:
Just know I got this error while I was googling the same issue . Some one suggested to upgrade numpy package . !pip install numpy --upgrade . After this command my jupyter notebook is working fine . I am running CNN models
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jupyter/notebook/issues/2784?email_source=notifications&email_token=ACYHH33KYHYFSQXOE3ZRLQTQKLLMRA5CNFSM4DXSFPW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7B6GXI#issuecomment-532931421, or mute the thread https://github.com/notifications/unsubscribe-auth/ACYHH3367NKIU2YSOPUSWS3QKLLMRANCNFSM4DXSFPWQ .
-- Clive DaSilva CPA,CMA Home: 416-421-2480|Mobile: 416-560-8820 Email: clive.dasilva@gmail.com LinkedIN: http://ca.linkedin.com/pub/clive-dasilva/3/197/b89
-- Clive DaSilva CPA,CMA Home: 416-421-2480|Mobile: 416-560-8820 Email: clive.dasilva@gmail.com LinkedIN: http://ca.linkedin.com/pub/clive-dasilva/3/197/b89
Still facing this issue.
Same here, and it just seems to be happening when I am running a CNN part of a script. I ran most of my CNN scripts using tensorflow and there was no problem. I also tried as suggesred to download the pytorch source an compile it. After 3 days of wasting my time doing this, downloads crashing halfway through , etc. I gave up PyTorch.org/Github , I hope that you are listening ??
On Thu, Oct 10, 2019 at 3:57 AM ||Dhoomketu|| notifications@github.com wrote:
Still facing this issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jupyter/notebook/issues/2784?email_source=notifications&email_token=ACYHH37YJDR6WSJBH3VGKUTQN3N6RA5CNFSM4DXSFPW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA3JGOY#issuecomment-540447547, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACYHH32L776KKTWJTJTPLILQN3N6RANCNFSM4DXSFPWQ .
-- Clive DaSilva CPA,CMA Home: 416-421-2480|Mobile: 416-560-8820 Email: clive.dasilva@gmail.com LinkedIN: http://ca.linkedin.com/pub/clive-dasilva/3/197/b89
I'm also facing the same problem. I use ssh connect to my server.
import pandas as pd
is ok.
but import torch
will restart the kernel.
The system is centos7, all libraries are latest.
Is there any solution?
This might be a solution. I haven't tried it.
I face the same issue with PyTorch CNN's
Me as well
Same issue with me when I try to model on Amazon's EC2 t2.micro free tier instance. It runs fine on my macbook pro however. Not sure what's causing this.
please use tmux for stable connection.
if someone still interesting in this problem solving. Try this in the cell before importing torch. Works for me.
import os
os.environ['KMP_DUPLICATE_LIB_OK']='True'
Thanks so much! It works for me !
Just know I got this error while I was googling the same issue . Some one suggested to upgrade numpy package . !pip install numpy --upgrade . After this command my jupyter notebook is working fine . I am running CNN models
that works for me. thank you
@NikitaMasl your solution works, thank you!
os.environ['KMP_DUPLICATE_LIB_OK']='True'
also works for me to fix the kernel issue for torch. Thank you!
System: Ubuntu 16.04 LTS 64-bit
As the picture shows, after
import torch
, the kernel died and restarting.Python version
Details:
Pip List