This is my first effort to run a Pycharm Jupyter Notebook project.
1) Create a project MyPythonProject. Done!
2) Create a new MyJupyterNotebook. Done!
3) Enter print('hello') into the triangular cell. Press the green run button!
Dialog appears saying please enter JupyterNotebook URL and Auth token)
4) Fair enough I go to command prompt type > Jupyter Notebook
carefully record it
http://localhost:8888=/?token=4e209a6963b8dab232c0b03379d5321431726df7713c53e0
5) Enter it into the little black dialog box!
6) Seems to connect no error BUT, no feedback. In fact I can put junk in the cell like #$#$$%#$##! in the cell and still see no output at all.
So where is my output going? I don't see this notebook after connecting to it? I don't see any results anywhere in PyCharm for executing the cell. For example I put junk in the cell and saw no output or errors anywhere in pycharm. I also put
print('hello world')
(sic) and saw no output.
I also don't see this Notebook has been loaded from PyCharm. And I wonder exactly how I would go about resetting the token if needed since the dialog just grabbed it I suppose its in project settings somewhere ... I am sure I am missing something but really thought I would see some type of output at this point when I run a cell. Any ideas what's wrong?
Update: I did load the notebook using file explorer in browser of Jupyter Notebook outside pycharm and I again see the contents of the file. But still not seeing any output in pycharm
Update: jupyter notebook keeps CONNECTING TO KERNEL
Seems like latest tornado version is not working as answered above.
There is a separate view for viewing output from cells in the top right. Just below the file tabs.
Related
In the screenshot we see a pretty normal-ish python code cell within the Pycharm notebook viewer The viewer "understands" the notebook: it is bringing up the managed Jupyter server option and knows this is [python] code:
So then where did the syntax highlighting go to? How can it be [re-]enabled ?
#Wayne was headed the right direction: that link he provided Wrong Code Highlighting in Jupyter Notebooks had suggestion to reload the python interpreter.
Well in my case the interpreter is Synapse Pyspark and is grayed out since i'm presently running locally. I need to figure out how to change the interpreter: will update here at that point.
Update I needed to edit the json source of the ipynb file to find and remove the synapse kernel.
I just got two days worth of work vanished because jupyter notebook was not able to save (_xsrf argument missing).
I browse the internet for solutions:
looking at the running directory in jupyter
looking at the saved version in jupyter (there are none in my case)
I am starting to look at the chrome logs to at least see everything I typed but they are binary. Would you know where I could find logs of everything that was typed on chrome ? Or any other solution to retrieve that code ? You would be my savior !
I had the same issue and was able to recover all of my code from the 'history.sqlite' file in the following directory: ~/.ipython/profile_default/
(on Windows it's C:/Users/USERNAME/.ipython/profile_default/history.sqlite).
This is a file that saves all commands that were issued to the IPython kernel. At the end of the file (opened in a text editor) I found my most recent commands from the Jupyter notebook. This will only work if you did actually run your code though, not if it was just written.
Some more information is on the website where I found this solution: https://medium.com/flatiron-engineering/recovering-from-a-jupyter-disaster-27401677aeeb
Lately, I've been running some Jupyter notebooks in VS Code, and I've been encountering a strange issue: whenever I open such a file, I am bombarded with pop-ups that look like this:
Sometimes a few will pop up; other times it can be upwards of 10 pop-ups. What's bizarre about this is that I already have my VS Code set up properly, and I can run my Jupyter notebooks just fine. I've tried selecting the 'Modify' option and going with the default selections just to make it go away, but no dice. How do I prevent these annoying pop-ups?
Per your new comments, can you check your default settings to see which application is targeted to open .ipynb files? Perhaps .ipynb files are linked to open (strangely) via the Setup exe.
I have installed Jupyter dashboard, however, when I choose either Grid or Report layout, my data is displayed as below:
I have tried to uninstall and re-install but doesn't seem to work. I am running Jupyter notebook 6.1.6 and Python 3.
Any idea what might be causing this? It is the same on all my notebooks.
Many thanks in advance
That is definitely weird!! If the notebook or your code is acting weird sometimes it is best to press the “RESET BUTTON”. Reseting the kernel clears all in memory objects and restarts your code from the very top.
To reset the kernel press the reset button, which is the curved arrow button, located under the word 'Kernel'.
I'm a noob in computer programming, today i installed vscode to learn python, everything was right, i run short and simple lines of code installed some extensions, but i dont know what happened, I'm not sure if i changed some configuration but when i try to run little lines of code (with the button) instead of running it and showing it to me in the "terminal section", it sends me to the "output" section and it just says that the code already run and its done.
Do somebody knows how to solve it please, it really makes me sad that i just ruined this program because its my first day and this already screw it.
As you can see in the picture, i run the code and it shows off something different in the output section, i wrote that but later changed it. It seem like it runs the file but only when i save it. :(
You must save the file to get the new output everytime.
For running code in Terminal with the button -
It looks like you are using Code Runner vscode extension. Which by default uses Output section to show output and cannot take input. You can change this behavior of that extension by pressing ctrl + , and going into vscode settings. Then just search code runner run in terminal You'll see an option to enable Run in Terminal feature turn that on.