I am trying to execute python code in VS code enabling jupyter notebook execution.Repeatedly the execution screen turns gray which makes the output invisible with the headers.Code will be still executable.
Any suggestions to recover from this issue..Each time copy pasting to another notebook and rerunning is not helping to solve the issue.
I also have the same issue with VScode and Jupyter notebook, in my case it only happens when the overall size of the notebook is large (more than 150 MB) which caused by keeping the output of the cells (in my case the high quality figures), this causes the notebook to crash and grey out all the outputs. The solution that I found so far is to clear the output, it won't crash again, there is also some solution suggested by the developers here, which suggests to remove the Code cash. I would suggest to break long notebooks to smaller notebooks, or clear the output.
Update
I frequently had this issue with my notebooks of any size. One of the solutions was to remove the code Cache on my Windows machine (for mac users you have to find the equivalent app data on your system and remove the Cache).
The easiest way to access the Cache folder is to open a run window and search the following line and delete the Cache as much as you can:
%APPDATA%\Code - Insiders\Code Cache
It helped me so far. Please let me know if it worked for you guys too or you found any other solutions.
Related
I know this may seem petty, but I'm struggling to fix an issue when I open a .ipynb in vscode running wsl2 as the remote. The issue is that the color/formatting doesn't seem to follow the VS Code theme.
Here is a screen shot as an example:
VS Code is running Solarized Dark as the color theme, but the ipynb is following a completely different dark theme. While it may seem like a silly thing (because otherwise the jupyter notebook is working as expected) the differences in themes make the code hard to read at times, and is a little jarring. It makes me rather work in a normal notebook, and that is the problem, because I'd really like to contain my work inside the IDE if possible.
Below you will see the only setting I could find related to this. When checked, the notebook "ignores" the VS code theme and turns white. When uncheck, it is dark as in the screen shot above.
You can see I'm running connected to a WSL2 remote backend. When I run in a normal windows setting, the .ipynb renders as expected, following the VSCode theme. The problem seems to persist exclusively when working in a WSL2 remote.
Is there any fix for this? I've not found anything yet despite quite a bit of searching.
I am a new user. I tried to see if this issue was already posted, but I could not find it.
I was doing data wrangling for a project in Jupyter notebook two days ago. I decided to update my Anaconda platform using the GUI interface. (I am new to coding and am not yet comfortable using the terminal to do things)
For some reason, everything seems fine with my Jupyter notebook except that the output will not show no matter what I do. Even print() does nothing.
I have looked around as much as I can elsewhere on the internet. This is not a firewall or security system conflict. Nothing else has changed except the update I did.
I believe my previous Anaconda/Jupyter version dated from March 2018. Is it possible to go back to that version? Would that be the best course of action? What version was current back then? How would I do that? I am on a Mac.
Thank you!
I read and heard a lot about Jupyter notebooks recently. I gave them a try and found it terribly obstructing to basically have to use an editor with the functionality of Windows' Notepad. Besides that I feel like I didn't get the fundamental point of Jupyter notebooks:
Can I not achieve everything that Jupyter does by editing plain .py files in any editor that is linked to a Python/IPython console? Specifically, I can edit Python code and run parts of it using the standard Spyder setup
or even with a properly setup Vim or Emacs.
The big difference being of course that any of these three setups gives me incredibly much more power to do all the other things that facilitate coding, like fast editing commands, code completion, debugging, refactoring, ...
You can save results and graphs of your runs like a report.
And it is better readable.
It is very good to share your results with others.
I have a relatively large Jupyter/Notebook (about 40GB of Pandas DFs in RAM). I'm running a Python 3.6 kernel installed with Conda.
I have about 115 cells that I'm executing. If I restart the kernel and run the cells, my whole notebook runs in about 3 minutes. If I re-run a simple cell that's not doing much work (i.e. a function definition), it takes an extremely long time to execute (~15 minutes).
I cannot find any documentation online that has Jupyer notebook installation best practices. My disk usage is low, available RAM is high and CPU load is very low.
My swap space does seem to be maxed out, but I'm not sure what would be causing this.
Any recommendations on troubleshooting a poor-performing Jupyter notebook server? This seems to be related to re-running cells only.
If the Variable Inspector nbextension is activated, it might slow down the notebook when you have large variables in memory (such as your Pandas dataframes).
See: https://github.com/ipython-contrib/jupyter_contrib_nbextensions/issues/1275
If that's the case, try disabling it in Edit -> nbextensions config.
I am running a Python script using Spyder 2.3.9. I have a fairly large script and when running it through with (300x600) iterations (a loop inside another loop), everything appears to be working fine and takes approximately 40 minutes. But when I increase the number to (500x600) iterations, after 2 hours, the output yields:
It seems the kernel died unexpectedly. Use 'Restart kernel' to continue using this console.
I've been trying to go through the code but don't see anything that might be causing this in particular. I am using Python 2.7.12 64bits, Qt 4.8.7, PyQt4 (API v2) 4.11.4. (Anaconda2-4.0.0-MacOSX-x86_64)
I'm not entirely sure what additional information is pertinent, but if you have any suggestions or questions, I'd be happy to read them.
https://github.com/spyder-ide/spyder/issues/3114
It seems this issue has been opened on their GitHub profile, should be addressed soon given the repo record.
Some possible solutions:
It may be helpful, if possible, to modify your script for faster convergence. Very often, for most practical purposes, the incremental value of iterations after a certain point is negligible.
An upgrade or downgrade of the Spyder environment may help.
Check your local firewall for blocked connections to 127.0.0.1 from pythonw.exe.
If nothing works, try using Spyder on Ubuntu.