More specifically, I am trying to edit the authors of a notebook. Using the Jupyter web interface, I can accomplish this like so:
Edit -> Edit Notebook Metadata -> add relevent tags (e.g. "authors": [{"name": "Author Name"}],)
How can I accomplish this using PyCharm?
I am using PyCharm's Jupyter add on provided with PyCharm pro
Right click on notebook in the project pane
Press mark as Plain Text
Close notebook tab (by pressing the x on the tab)
Open notebook by double clicking the notebook in the project pane
Once you're done editing the notebook's source, repeat steps above but press "Mark as Jupyter Notebook"
Related
Whenever I start a Jupyter Notebook, it creates and automatically opens an HTML file. How do I stop this? HTML files are opened by default on my system in my text editor, not my web browser, and my terminal allows me to click links to open them, and the link to the notebook is in the output of the command, so I don't need the link in the HTML file.
Should have thought of it first, but the help file answered the question (jupyter notebook --help):
jupyter notebook --no-browser
I'm trying to change the default working directory for Jupyter notebooks (anaconda installation). I've looked up many different answers, most of which focus on changing the jupyter_notebook_config.py file, but none of those work.
Some of the things i've tried:
This medium article
This github issue (bottom reply)
This
This too
No matter what I try, whenever I start jupyter notebook the directory I see is C:\Users\me.
I admit part of the problem is that I'm not great with command line things which makes some of the answers difficult to understand.
If you run the Jupyter Notebook from the Windows Start Menu then you have to change the command running Jupyter Notebook in the shortcut. Right click on the Start Menu on the shortcut, open file location, right click on the Jupyter Notebook shortcut, select Properties, and in the Terget Textbox, change the "%USERPROFILE%" part in what you wand or if you have changed the Jupyter config file, delete this part.
In classic Jupyter Notebook File -> Download as has a Notebook (.ipynb) option to download the original notebook source.
JupyterLab only seems to have File -> Export Notebook As ... only offers non Notebook options. Is there a simple way to download the actual notebook from JupyterLab
In Jupyter Lab, on the left side, there is tab "Files", which will show the directory structure. In that, right click on the Jupyter Notebook and there would be a option to download it.
In Jupyterlab, there is a text editor that we can open .py files, is it possible to also turn on tab completion, just like how it works in Notebook ?
By now, tab completion in the text editor of jupyter lab has been implemented in this pull request (see also discussion in this issue). However, for it to be working you need to open a console for the editor (right click in the editor window and select Create Console for Editor).
No, it is currently an open issue. https://github.com/jupyterlab/jupyterlab/issues/1276
The package jupyterlab-lsp now provides tab completion in the text editor. You need can install it from pip or conda, along with a language server for Python:
pip install jupyter-lsp
pip install jedi-language-server
I also needed to enable the server side extension:
jupyter server extension enable --user --py jupyter_lsp
And enabled #krassowski/jupyterlab-lsp and #krassowski/completion-theme via JupyterLab's extension GUI (the puzzle piece on the right hand side). Then I restarted JupyterLab, and completion worked (with Tab). I am not sure if all these steps are neccessary, it might depend on your environment.
In Jupyter notebook, after I click File->New Notebook, the file is stored to the root home directory of my anaconda installation. Why isn't there a "save as" option to allow save the new notebook to a directory which I created myself? I have to move the file in my terminal. I am just curious about. Is that possible? That seems a common use case.
The notebook you are creating with the "new" button, saves it under the directory you are currently under when pressing that button.
There is also the "save as" option in both jupyter and jupyterlab, as soon as it is already created.
In jupyter:
In Jupyterlab: