I have spent a week searching and trying different solutions with no luck. I've seen several others having the same problems going back over a year.
The issue:
Windows 10 Pro build 15063.674
I'm using the latest Anaconda 5 build with Python 3.6.2 and all the packages are updated to most recent.
Running Jupyter Notebook, after some time, python will crash with a dialog "python has stopped working". This seems to happen after the notebook has been open for awhile, but I haven't been able to pinpoint an exact time. It's longer than 15 minutes but I've had it crash after a couple hours too.
The crash happens whether or not the notebook is in use, but most of the time, it's been while it's idle.
The console contains several lines like this:
Assertion failed: Connection reset by peer (bundled\zeromq\src\signaler.cpp:298)
I had been using everything with no issues, on a daily basis for months prior to this. I honestly have no idea what could have changed other than Windows Automatic updates.
What I've tried:
updating anaconda
updating all packages
updating python
full clean removal then reinstall of anaconda, python, and all packages
updating everything again
removing pyzmq and Jupyter then reinstalling
disabling Windows Defender
attempted to revert pyzmq on a long shot to 13.1.0 but the build failed
I've also tried using both conda and pip for installing/removing
Threads I've read:
https://github.com/zeromq/libzmq/issues/1808
https://github.com/ipython/ipython/issues/9975
https://github.com/ipython/ipython/issues/9236
https://github.com/zeromq/libzmq/issues/1108
https://github.com/zeromq/libzmq/issues/1573
Why python raised an AssertionError on some failed assumption in a ZeroMQ client?
Python.exe crashes while running Jupyter notebook sever
Why Does Jupyter Notebook Crashes?
Any suggestions on fixing this?
From the first issue thread you linked, it looks like this issue is with ZeroMQ, with little hope for resolution. One poster (UniversalAE) in that thread seemed to have success with replacing ZeroMQ with RabbitMQ. Absent an update to ZeroMQ that resolves this, or any specific requirement for ZeroMQ, I would advise doing the same, i.e. swap out ZeroMQ for RabbitMQ.
The solution was to uninstall a program called Networx.
I don't understand the error myself but the person I got the solution from linked this post: https://github.com/Microsoft/WSL/issues/1554#issuecomment-339743927
Related
I am struggling with installing "IJulia" in Julia. I tried Pkg.add("IJulia") and .build("IJulia")
but there must be some problem going on with this part it keeps saying
"LoadError: Failed to precompile Parsers
[69de0a69-1ddd-5017-9359-2bf0b02dc9f0] to
C:\Users\박원정.julia\compiled\v1.4\Parsers\833b9_AFua3.ji."
It would be much appreciated if someone can help me with resolving this problem...
On the first run IJulia is installing Jupyter. Having bad luck this might fail.
Once you perform the already suggested deleting .julia\compiled, you can try installing Jupyter into your Julia manually (this is something I do when providing Jupyter installation instructions for large groups of people and is tested to work each time on many machines and environments):
using Pkg
pkg"add Conda"
using Conda
Conda.runconda(`install jupyter --yes`)
pkg"add IJulia"
pkg"precompile"
I was successfully able to install Jupyter Notebook, with Anaconda. Everything was working fine, until suddenly one fine day I started to receive this message. Its happening when my Kernel is running for about continuous 1-1.5 hrs continuously.
I had gone through all possible solutions over Github, and did the following stuffs:
Uninstalled networkx
Turned off Firewall
Checked whether there is any anti-virus in my system, but there is none.
Since doing these did not fix the issue and ultimately I uninstalled zmq:
pip uninstall zmq and now I get this message:
Although I'm getting this message, but it seems that its not crashing automatically, I have to check for a longer time though. But I think that I'm doing something wrong, or something is there I'm not able to understand.
My OS is Windows 10, with only Windows Defender (Real-Time Protection) turned on, but previously also I had my Firewall and Defender both on, but never had this issue, suddenly I'm having all this problem. I didn't install anything, nothing.
I have found that if you change the port no. in signaler.cpp file, it may solve the issue, but at least if someone can help me locate the file atleast, I'm not able to find it under library folder in Anaconda packages.
P.S. If anyone can also tell me the significance of zmq library and whether it is important to keep it. Also I'm getting ssl error everytime I try to pip-install a module. So I have to write extra trusted link to do the installation.
I'm trying Anaconda/Spyder after using the standard python installation/IDLE for several years. The console (and variable explorer) becomes progressively slower during each work session, with every script and interactive command that I run. Eventually it takes minutes to get a response to simple commands like print, and then it stops responding completely and I shut it down. It's pretty disruptive to my work.
Mac OSX 10.13.6
conda version : 4.5.11
conda-build version : 3.15.1
python version : 3.7.0.final.0
qt 5.9.6
spyder 3.3.1
ipython 7.1.1
I do use matplotlib frequently. Whenever possible I use plt.ioff() at the beginning of a script and/or plt.close('all') at the end. Turning off matplotlib support completely in preferences doesn't help and it's not a permanent fix anyway. Python is not using anywhere near all my CPU or RAM.
As far as I've found out, the problem seems to be with the latest major release of the ipython kernel. Pinning the version of ipykernel to 4.10.0 solved it for me. To do so, add a line containing ipykernel 4.* to the file ~/anaconda3/conda-meta/pinned. Create the file if it does not exist yet. Then conda update ipykernel which will actually downgrade to 4.10.0. Worked for me!
you don't need to downgrade the entire spyder.
For me it worked with downgrading these two:
conda install ipython=6.4.0
conda install ipykernel=4.10.0
So this is not a totally satisfying solution but it seems to be a reasonable temporary fix. If you downgrade your spyder version to 3.1.X you will be able to use the python console rather than the Ipython console, and this seems to work for me. To do this just run:
conda install spyder=3.1
in the terminal while your environment of choice is active. This is not ideal, because the developers removed the python console for a specific reason as mentioned in this question, How to add python console in spyder.
Additionally downgrading this much may have unforeseen effects on other packages your code uses and may cause other issues but so far this is the only solution I was able to come up with.
#Sjoerd Thanks for your answer, this is what worked for me. To be still clearer, here's what I did in terminal on Anaconda 3 on High Sierra:
echo "ipykernel 4.10.0" >> ~/anaconda3/conda-meta/pinned
conda update anaconda
When I tried to update only ipykernel, I would have dependencies errors. By updating anaconda, everything is now up to date but ipykernel which is effectively at version 4.10.0. I didn't experience any hang since then.
#JJR4's answer didn't work for me (seems to work for others). Another workaround is to type %connect_info magic command into the IPython Spyder console which will display the JSON info to connect another console to the kernel.
The output of the magic command explains how to connect, but basically there are three options.
Paste the above JSON into a file, and connect with:
$> jupyter <app> --existing <file>
or, if you are local, you can connect with just:
$> jupyter <app> --existing <kernel>.json
or even just:
$> jupyter <app> --existing
if this is the most recent Jupyter kernel you have started.
I typically use qtconsole as the app. Once you enter your chosen connection method into the command line, a new console will open that is connected to the same kernel as the console in Spyder. For some reason, the new console does not lag even if the Spyder console does.
Enter everything in the new console, even runfile()
Hope this helps!
UPDATE:
Downgrading to ipykernel version 4.10 seems to solve the issue for me. Thanks to Carlos Cordoba - see GitHub conversation in link below.
I'm trying to install several plug-ins in Spyder IDE, such as:
unit test
notebook
line profiler
spyder-terminal
memory-profiler
spyder-report
But unfortunately, I've got some serious problem. The installation was good, though I couldn't install spyder-vim and conda-manager plug-in for some unknown reason.
But the thing was horrible after launching the IDE. It's just broken somehow and not responding. Mouse unclickable. The interface was totally messed up.
After removal of these plug-ins, I again manually installed those plug-ins and tried to figure it out which plug-in caused this.
This time I only installed
unit test spyder-report notebook terminal
and now after launching, I saw interface was a little bit finer than before and discovered some problem in the spyder-report plug-in. While rendering report to HTML it showed the following error:
signal only works in main thread
I'm not sure whether I'll try other plug-in, but everything is pretty OK now except the spyder-report plug-in. I googled it for a day, but I found no effective solution.
You didn't say which version of Spyder and Python you installed, nor which operating system you are using. So, using Debian unstable and Python 3.6.5, I installed:
spyder3, 3.2.6
spyder-common, 3.2.6
python3-spyder, 3.2.6
python3-spyder-memory-profiler, 0.1.2
python3-spyder-line-profiler, 0.1.1
python3-spyder-reports, 0.1.1
python3-spyder-unittest, 0.3.0
as well as all of their dependencies. After that, I started spyder3 without any problems (except that I have to use the Spyder 2 icon theme, because it can't find the Spyder 3 icons). The Reports tab works fine, no "Signal only..." error.
The problem with spyder-vim seems to be that no actual release has been made yet, so pip3 install spyder-vim doesn't find anything.
Last, I added the terminal plugin with pip3 install spyder-terminal.
Again, after that all is working fine.
I'm fairly new to programming. I am a student of Mathematics and one of my modules has python programming as part of it. I was told to download python 3.5 and, using cmd and pip, to download the following packages which I did:
matplotlib,
ipython,
notebook,
numpy,
scipy,
After downloading them I entered, in cmd, ipython notebook but an error message saying "The program can;t start because MSVCP140.dll is missing from your compute. Try reinstalling the program to fix this problem." I have tried to reinstall python and the aforementioned packages but the same message keeps popping up. What can I do to fix this?
Sorry if my post is in the wrong section of the forum, this is my first time on Stackexchange.