I am using Jupyter in Firefox on OSX. Is there a way I can ensure the notebook opens in a window without any of the toolbars etc of firefox?
I currently use it for julia by running
using IJulia
notebook()
but I guess the kernel should not matter.
Thanks.
Perhaps the following will be useful (untested):
https://support.mozilla.org/en-US/questions/1029353
By the way, you can launch the notebook directly from the terminal using
ipython notebook # IPython version < 4
or
jupyter notebook # Jupyter version >= 4
[
or
ipython notebook --profile julia
if you are running IPython < 3, in which case I recommend upgrading
]
Also note that in Chrome there is a nice mode with the toolbars hidden via
View -> Enter Presentation Mode
(I do not see anything like this in Firefox.)
You can then manually hide the IPython/Jupyter headers with View->Hide toolbar and View->Hide header from within the IPython/Jupyter menu.
In this way you can get the whole screen dedicated to your notebook with (almost) no visual clutter.
Related
Peeking at Jupyter notebooks is a long process, need to cd to the file location and need to run jupyter notebook to start the server and get things done, but I don't need to edit or work with it. Is there any other possible way to just take a look at notebooks quickly?
Looking for the Linux equivalent of this tuxu/nbviewer
PS: Already know about a Firefox extension but it is broken now.
.ipynb(s) cannot be previewed, instead if you convert your notebook to html, it can be previewed right away, use jupyter nbconvert --to html yournotebook.ipynb and preview it with a double click. You can write your own code to automate this since you are using python, or you can install this nb-viewer which basically lets you open .ipynb(s) in your linux machine with a double-click.
Currently, I access Jupyter notebook by opening Anocanda Navigator then opening the notebook link. I have tried to bookmark the webpage but most of the time it doesn't work since it is a local page and I think some of the files are still "running" (I am clearly not an expert here and well aware of how stupid this may sound). Is there any way to have Jupyter Notebook as its own desktop link without having to open it via Anaconda?
For Windows, you can create a shortcut pointing to the following path:
%PY_HOME%\python.exe %PY_HOME%\cwp.py %PY_HOME% %PY_HOME%\python.exe -m jupyter notebook
Where %PY_HOME% is my environment variable pointing to the Anaconda folder (example: C:\Users\myuser\AppData\Local\Continuum\anaconda3). It's useful to use the environment variable because you may run out of characters.
If you want to run a especific environment:
%PY_HOME%\python.exe %PY_HOME%\cwp.py %PY_HOME%\envs\myenvironment %PY_HOME%\envs\myenvironment\python.exe -m jupyter notebook
You could make a bat file like so and put it in your desktop
start_jupyter.bat
:: enable anaconda environment
set root=C:\ProgramData\Anaconda3
call %root%\Scripts\activate.bat %root%
:: start jupyter
call cd "C:\Users\<USER>\<JUPYTER DOCUMENT ROOT>"
call jupyter notebook
pause
If you are on windows, open the search function on your nav bar on the bottom. Type "Jupyter Notebook". It should populate with your notebook. Then, right click on it and select "Open file location". This will take you to the file explorer. Finally, on the Notebook application that you use to run the Jupyter Notebook, right click "Copy". Then go to your desktop, and right click. Select "Paste shortcut", and Eureka! You should have the application shortcut on your desktop.
you can launch your jupyter notebook from remote server by trying on cmd prompt:
jupyter notebook --no-browser --port=8080
or run the following command to launch with default port:
jupyter notebook --no-browser
You can create a text file on your desktop and paste the following line into it:
jupyter notebook
Then save the file as Jupyter Notebook.bat and use it as a shortcut for Jupyter Notebook.
On linuxmint
<default_path_to_launcher> = /home/editUserName/anaconda3/bin/jupyter-notebook
<launch_in_a_specific_folder> = /home/editUserName/anaconda3/bin/jupyter-notebook --notebook-dir /editPathToDirectory/
By editing main menu
1.1 Right click menu
1.2 Select Configure
1.3 Open Menu tab
1.4 In Layout and content, at the last, click Open the menu editor
1.5 Select any folder where you want to place the launcher
1.6 In the right sidebar, select New Item
1.7 In the Launcher Properties window, enter following
- Name = Jupyter Notebook
- Command = <path to launcher> or you can <launch in a specific folder>
- Comment = Open Jupyter Notebook
- click Icon, search jupyter, select any
- OK
1.8 Now open menu, go to the folder, et voila Jupyter Notebook, click it
1.9 If it launches, then open menu, go to that folder
1.10 Right click the launcher
- Add to desktop
- Add to panel
- Add to favorites
On desktop
2.1 Right click on desktop
2.2 Select +Create new launcher here
2.1 Follow step 1.7
Note 1: Replace jupyter-notebook with jupyter-lab in commands above, and that will launch jupyter-lab
Note 2: Do not edit the launcher using text editors. In my experience this breaks the launcher. Follow steps 1.1 to 1.5, in the right sidebar, click Properties to edit command or icon. On desktop, right click the launcher, select Properties.
Note 3: For Windows, creating .bat file as per this works on Windows 10. You can even remove call cd line, and modify next line as `call jupyter notebook --notebook-dir /editPathToDirectory/
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 know that JupyterLab is the next-generation web-based UI for Project Jupyter and it's based on the Jupyter Notebook and Architecture, and it will eventually replace the classic Jupyter Notebook.
I am a bit confused about the differences and relationships between Jupyter widgets and JupyterLab Extensions:
Will JupyterLab Extensions eventually replace those Jupyter widgets for using interactive Notebook?
Is Jupyter Widgets only for classic Jupyter Notebook? Or is Widgets just one type of the Extensions for JupyterLab?
I'm not an expert on Jupyter extensions, but I think the following is accurate (please correct me if someone knows otherwise).
Jupyter widgets are actually implemented using an extension.
The main difference between widgets and other extensions is that
the Python kernel in a notebook can easily interact with a widget
-- the kernel can "call in" to the widget and the widget can "call back" to the kernel. For example the kernel can change the text label for a button in the widget and a button press on the widget can cause
Python code to execute in the kernel.
For example the following notebook creates a widget with a click callback to python which calls back to Javascript to change the appearance of the widget:
https://github.com/AaronWatters/jp_proxy_widget/blob/master/notebooks/hello%20proxy%20world.ipynb
Extensions do not automatically build in ways for a Python kernel process in a notebook to interact with the extension instance, although it is possible to implement them.
In R Studio, Matlab, and in some Python IDEs (like Thonny) you can see a list of the variables in your environment, together with some summary information like values, type etc.
Is there a way to do this in VSCode without going into debugging mode?
Seems like the closest as it gets to the RStudio Environment window is by installing Jupyter. Then you can type #%% in your .py file and a small "Run Cell" button will appear. Running the cell will open the "Python Interactive Window". There you can click the "See Variables Active" button to open up the Variable Window and see your variables... still a bit painful in comparison with RStudio, this should be integrated in VScode's IDE.
See steps here:
https://code.visualstudio.com/docs/python/jupyter-support-py#_variable-explorer-and-data-viewer
VS Code has an IPython mode with a dropdown box called Variables that basically does exactly this.
To enter IPython mode all you need to do is highlight a piece of code and hit Shift+Enter
The first time you do it there might be a bit of setting up to do but it was pretty easy to get it working on my Mac. Not sure what it's like on Windows/Linux though
Note: When I use VS Code I open it from the terminal (simply enter the command 'code') after I've activated my conda environment. That way the IPython interpreter uses my preferred conda environment when it launches.