When I code in jupyter notebook/lab, if I press enter, two new lines will be
generated, like this:
If I press tab, the code hint appears, but the cursor jump to
the next cell, like this:
These two problem appear recently, I have uninstalled all ipython & jupyter
and reinstall, change browser from chrome to firefox, even when I code in
google colaboratory and coursera's deeplearning exercise, except in pycharm.
I find a great tool solved these problem partly--nteract, I can run local jupyter notebook in it, but the online jupyter notebook run in browser remains unnormal.
New in April 6, I finally find it! This is caused by a script of tempermonkey, which called remove-web-limits, just disable it and everything OK!
Related
I'm using the Jupyter extension on VSCode, Windows 10. I'm using Python through Anaconda.
I'm using a jupyter notebook and am running several different cells. After I run some of the cells a few times and restart the kernel a few times (to allow modules that I edited to update for the notebook), the notebook eventually stops running the correct cell. No matter what cell I try to run, it always runs the same cell, which is directly below my most used cell/the cell I used last. Opening and closing VSCode works but is only a temporary solution, and the issue has been arising more often. Does anyone know how to fix this?
I am interested in using VSCode's Jupyter notebook functionality and I am just trying to get to grips with it. I can start the kernel and run the notebook cells in VSCode.
After running particular cells it seems to crash with no warning and the code fails as the variables have been cleared. I have to reselect the kernel in the top right and start running the code again from the beginning until I get to the problem cells, and then the issue repeats itself.
I don't think it's anything to do with the Python code, it's some simple dataframe manipulation. I have tried the same notebook just running it in the browser and it works fine.I am running Jupyter through a venv with Python 3.7.6, MacOS Catalina (10.15.4), VSCode 1.45.1.
Something I noticed that might help indicate what is happening, is when it crashes I can run basic python statements in the notebook cells (without reselecting the kernel). But when I run my cell which tries to import tests from a .py file in the same folder or import data files using a relative path, it can't find them until I reselect the kernel. It seems like the cwd has changed? Can anyone assist with this?
I am having issues with changing the starting folder of Jupyter notebooks, as I would like to run the notebooks on a shared server. I am running Windows 10. I have already tried several of the options online:
I have tried changing the "Start in" property of the jupyter
shortcut: now the shortcut just quickly opens the terminal, then
immediately closes again and nothing more happens.
I have tried running the "jupyter notebook --generate-config"
command, both in and outside python: in the first case it tells me
that jupyter is not a recognised command, and in the second that
there's a syntax error at notebook.
I have made a .bat file with the instructions of the shortcut ('''C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\python.exe
C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\cwp.py
C:\Users\USERNAME\AppData\Local\Continuum\anaconda3
C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\python.exe
C:\Users\USERNAME\AppData\Local\Continuum\anaconda3\Scripts\jupyter-notebook-script.py
Z:\Test''') but it
simply opens the terminal in python, and nothing more.
If I try to launch jupyter from the anaconda interface it works, and I can also start it from the terminal, but not in any other way.
The "jupyter notebook --generate-config" method, explained well in this answer from #marneylc, worked, I just had to start in the Anaconda Promt, rather than in cmd.
I hope this is the right way of answering my own question...
If open a python jyputer notebook in vscode, then try to execute the notebook (so a kernel starts) and realize I need to activate a different environment, there doesn't seem to be a way to switch environments without completely quitting VSCode and coming back in.
If can switch environments in the terminal window or using the environment picker in the lower left, but it there doesn't seem to be a way to quit the current kernel and have it re-launch under the new environment. I've tried using the "Restart Kernel", closing the notebook and re-opening.
Is there a way to do this?
I'm a developer on this extension. The intention was for this feature to function as the Python Interactive Window did, where you could use the VSCode Interpreter picker to change out an open notebook to a new kernel. However it appears that we have a hitch that we shipped with this functionality. There is already an issue open in our github here which I believe that you filed (just going on user name match :)):
https://github.com/microsoft/vscode-python/issues/7862
That will be the right place to track our progress on fixing this, and it's on our immediate backlog.
I am trying out IntelliJ. I have installed the Python plugin, and IdeaVim.
I cannot navigate properly across Jupyter Notebook cells using hj. I mean, on normal mode, I cannot go to the next (or previous) cell, even if there is one, using hj.
Is there a way to do it without the mouse, possibly rebindable? I have read the tutorial and tried to find something in the program, but could not.
Ideavim plugin doesn't seem to support Pycharm's notebook implementation as of right now :(
There's an open issue marked as "bug" on Ideavim's issue tracker that was opened back in 2015 and it seems like it doesn't have any progress made since.
However according to the comment in the issue thread you can:
funny way to get into the command mode is type something so that the suggestion panel appears, now press "esc" you will get into Vim command mode
So this might indicate that this could be solved and updated in the future.
As an alternative you can try out jupyter-vim-binding, however it doesn't work with Pycharm either.