I use jupyter notebook to run the python example for the UHD. When I run the command on jupyter notebook for multiple times, it just keep showing me the kernel has dead. Besides, when I run the uhd_find_devices again in my ubuntu terminal, it shows uhd device not found. When I switch off the jupyter notebook, it is now showing the uhd devices. Any way to make it connected to both way and solve this issue??
I just run this on jupyter notebook
import uhd
import numpy as np
usrp = uhd.usrp.MultiUSRP()
Related
I have tried to run the most basic Ipyvolume code in my Datalore notebook, unfortunately It didn't display anythong. The code:
import ipyvolume as ipv
import numpy as np
x, y, z = np.random.random((3, 10000))
ipv.quickscatter(x, y, z, size=1, marker="sphere")
It shows only a blanc line after running it.
I had configured the notebook settings in the init.sh file, however it didn't make any difference. Here are the settings I have tried:
pip install ipyvolume
jupyter nbextension enable --py --sys-prefix ipyvolume
jupyter nbextension enable --py --sys-prefix widgetsnbextension
I just want to see 3D (nifti) images in 3D as I can do it with ITKSnap. As far as I know Ipyvolume is the best suited library for that and should be working perfectly fine with jupyter notebooks. I don't know what should I do when using specifically Datalore notebook.
Thanks in advance for the help.
I'm writing a startup script for users of my Jupyter Lab extension that customizes the pandas dataframe output display using a formatter. The formatting only makes sense in the context of Jupyter Lab, but because the file is in the user's .ipython/profile_default/startup folder, it gets executed every time a IPython kernel is started.
I have tried using get_ipython().__class__.__name__, however 'ZMQInteractiveShell' is returned both in JupyterLab, Jupyter Notebooks, and VScode. I'm specifically looking for the case where the user is in Jupyter Lab.
Does anyone know how to detect if the IPython kernel was started by launching Jupyter Lab and either 1) preventing the startup file from running all together, or 2) just casing in my startup file itself to not load the formatter when it wasn't started through Jupyter Lab?
My startup file:
try:
import pandas as pd
def df_formatter(obj):
return f'<div><div onclick="console.log(\'You are in Jupyter Lab\'">In Jupyter Lab?</div> {obj.to_html()}</div>'
html_formatter = get_ipython().display_formatter.formatters['text/html']
html_formatter.for_type(pd.DataFrame, df_formatter)
except:
print('Unable to run startup script')
I have been able to start a remote ipython console using 'python -m spyder_kernels.console' and connect to it using Spyder on my local machine. However, this just gives me a console. I want to get a notebook running remotely and connect to it using Spyder. I understand the Spyder kernel is different and has several modifications. My question is, can I start a remote Jupyter notebook, using a Spyder kernel, and then connect to this notebook from inside my local Spyder? I have the Spyder notebook plugin installed. The idea is that since the notebook is started using a Spyder kernel, Spyder should be able to interact with it and the Variable Explorer should work.
PS: I know it should be possible to start a Jupyter notebook with the Spyder kernel, because that's exactly what the notebook plugin for Spyder does inside of Spyder. I just want the ability to start this notebook remotely and then connect to it.
Installed WSL on Windows 10.
Installed Anaconda according to the Anaconda documentation with the following commands:
bash Anaconda3-2020.02-Linux-x86_64.sh
source ~/.bashrc
You can see the '(base)' in the beginning of each command input line, indicating the conda is activated.
Then I run jupyter notebook by typing:
jupyter notebook
Then I see the following changes as shown in the screen record.
Briefly, the WSL terminal window showed some information very quickly, but is changed to the windows powershell window before you could even tell the information that showed up. I know those information should contain a file and url for opening the jupyter notebook in the web browser. But they flashed out so quickly. Does anyone know why this happens?
Here is a dynamic graph of the Screen record of this issue:
Solved:
1. Wait for a bit more time on the windows cmd and the jupyter notebook running information will show up, where includes the url to open jupyter notebook in the web browser.
OR
Open up another wsl terminal, activate the same environment and type jupyter notebook list, which will show the current running jupyter notebook server. The url is also can be found there.
I've just installed Jupyter Notebook so I can follow the Udemy Python Bootcamp course.
I already had a fully working install of Python 3.71 and Pycharm and then installed Jupyter Notebook with:
pip install jupyter
This was successful other than messages about the some files not being in the PATH environment variable. I manually added the folder to PATH.
I have run Jupyter Notebook at the command prompt with:
jupyter notebook
So far so good - Jupyter Notebook home screen appears in my browser with all the expected folders, Documents, Desktop etc listed.
However if I try and left click on one to see its contents then it pauses for a few seconds and just displays the following (not very descriptive) error:
Server error: error
The error as a screen shot:
I'm absolutely stuck and can't progress my course without Jupyter Notebook.
I'm running Windows 7 Home Premium 64 bit
Firefox (Quantum 64.0)
Bitdefender Internet Security 2018
You can try
pip install --upgrade jupyterhub
I solved the problem using this command.