I just installed a few libraries for Deep Learning like keras, theano etc. The installation went fine but when I write code in Jupyter notebook and press tab for autocompletion, the kernel of jupyter notebook seems to take too long for autocompletion. There have been time when it has taken minutes to display autocompleted options. I initially thought that the kernel hung so I had to restart it every time.
I read in another Stack Overflow post that installing pyreadline may help. I installed it but I'm still having the same problem.
Has anyone else faced this problem? How do I go about fixing this?
Any pointers would be greatly appreciated.
Little late answer, but you might try this at the top of your notebook:
%config Completer.use_jedi = False
Jedi is the culprit.
Either you can disable it as suggested by #Miles above, or remove it completely.
pip uninstall jedi
Uninstallig worked for me. Jupyter suggestions are much faster now!
Related
I have a problem that interactive objects from ipywidgets do not work in Jupyter Notebook on my computer. The widget itself is displayed but the function that it should control (e.g. drawing graph with changing parameter), seemingly, does not run. I took example from documentation and it does not work.
The picture of code and output
Code:
import ipywidgets
import widgetsnbextension
def greeting(text="World"):
print("Hello {}".format(text))
ipywidgets.interact(greeting, text="IPython Widgets")
What have I already tried:
There were similar questions, like this but the answer didn't work for me (the answer was to run this:
jupyter nbextension enable --py widgetsnbextension).
The code above works in GoogleColab so I tried to install their versions of packages ipython and ipykernel (packages ipywidgets and widgetsnbextensions were of the same version as mine). But it has led to errors so I have given up this idea. I have the latest versions of all packages now and I don't have Anaconda.
What should I try next? May be I am wrong and the problem has a different cause?
I found the answer!!!
I have had several nbextensions switched on (see screenshot). This was my mistake to include everything which seemed useful. When I turned off all nbextensions then all ipywidgets stuff started to work. Finally, I found that one particular extension called Limit Output is to be blamed for. Turn it off and all works fine.
The moral: don't use everything if you don't need it. Also, obviously, there is a bug in Limit Output extension because it is not supposed to affect widgets (it is supposed to limit output data when you accidentally write while(true) or something like that).
You can read some useful stuff about SageMath in the comments under the original question as well.
I just downloaded Anaconda on a new laptop (have used Python many times before), and I currently can't run any code in Jupiter Notebooks. I am stuck in [*] no matter how simple the code (i.e. import pandas as pd or say x=1). Any suggestions on how to fix this? So far I have tried restarting Anaconda and shutting down the code in the running tab.
Based on the logs, take a look at this related question. Otherwise, googling python3 ERROR:tornado.general:Uncaught exception in ZMQStream may help.
I found the answer. The solution is not anywhere on stack overflow or Google. The answer to this problem is only on YouTube, which I found slightly surprising. Essentially, I had two versions of Anaconda, because it would seem that Macs come with an older version of Anaconda already installed in a hidden file called opt. I had to locate this file and then delete it in the terminal. Once Anaconda was completely removed, I was able to re-download Anaconda and then Jupyter was able to launch smoothly.
For anyone else having this problem you can find the solution here: https://www.youtube.com/watch?v=SJ_JTgq8-m8
i can t use #%% anymore as a jupyternotebook cell. Its not marked as one or visuallized in any way. I tried reinstalling but didn t work.
I recently had a weird message which said something like "save code browsing activated" and casually just clicked away.
Any ideas how to get it back to normal?
I programm with #%% 99% of the time so i am kind of lost right now :D
regards martin
Check that you are in the right Python virtual environment, inside your VS Code. If you are in a virtual environment where you do not have the ipython packages installed, that would explain it.
I am having a problem with creating a new ipython notebook.
Previously I used to do that going to new -> python
but now I am unable to see any python option.
Also, I am unable to open any ipython notebooks, I have one uploading for hours now.
I recently erased my %temp% folder to free some space in the C drive. Does that have something to do with this? How do I fix this?
I solved the problem!
For some reason, jupyter labs was not installed
So running the command
jupyter -- version
and then checking what all was installed, I found out that jupyter labs was not installed?
pip3 install jupyter labs
so I went ahead and installed it and everything works as it did before.
Still don't know the reason why this all happened in particular. If anyone could help me with that'd be awesome!
I'm not sure 100% but this is most commonly related to an ipython jupyter notebook file error. I do recommend to do a clean install of the notebook and try again. As I don't have any specifications on your system is difficult to guide you on the process. But that is the best option you have now.
Also this could have happened because of an update on python, jupyter, your system or any base component required by jupyter or python.
I've a problem when I updated notebook to Jupiter.
The menubar and tools are missing like in the following image.
I'm on Kubuntu14.04. I tried installing via different methods and version of python. Same for any browsers. No warnings when launching notebook.
Someone have the same problem on windows (here).
If you have any ideas.
Thank you.
Fixed removing ipython and major part of Jupyter traces and reinstalling everything from anaconda.