Kernal failed in jupyter notebook - python-3.x

I am trying to execute a jupyter notebook in VSCode and I get the following error:
`Failed to start the Kernel.
Jupyter server crashed. Unable to connect.
Error code from Jupyter: 1
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 5, in
from notebook.notebookapp import main
ModuleNotFoundError: No module named 'notebook'.
View Jupyter log for further details`
Can someone suggest how to fix this?

Related

ModuleNotFoundError: No module named 'torch.backends'

I would like to run the yolov5 source code for object detection on visual studio, but every time I run it, I get the following error. I tried to post the full code here but it kept giving me an error. Anyone who can help?
PS C:\Users\ALLO CEDRIC BOLAMBA\Desktop\Project> & "C:/Users/ALLO CEDRIC BOLAMBA/AppData/Local/Microsoft/WindowsApps/python3.10.exe" "c:/Users/ALLO CEDRIC BOLAMBA/Desktop/Project/detect.py"
Traceback (most recent call last):
File "c:\Users\ALLO CEDRIC BOLAMBA\Desktop\Project\detect.py", line 8, in <module>
import torch.backends.cudnn as cudnn
ModuleNotFoundError: No module named 'torch.backends'
PS C:\Users\ALLO CEDRIC BOLAMBA\Desktop\Project>

subprocess.Popen ModuleNotFoundError

I am trying to run a python script through another python script, with subprocess.Popen. I have:
import subprocess
p = subprocess.Popen(['/Library/Frameworks/Python.framework/Versions/3.8/bin/python3',
'myscript.py'])
p.poll() is None
Sometimes I get:
Out[21]: <subprocess.Popen at 0x11b5823a0>
But nothing happens and the script is not executed.
Some other times I get the following error:
Traceback (most recent call last):
File "myscript.py", line 11, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
I am pretty sure that the requests module have been properly imported in the script I am trying to run. Any help welcome ;)

Cannot import installed python package (MacOS)

I cannot import any python package when running python on Visual Studio code or on my Terminal. I can still do this if I were to code on a Jupyter notebook. However, when I tried other environment that doesn't use the notebook server. It returns me ModuleNotFound Error like this
Traceback (most recent call last):
File "/Users/truongminh/Desktop/DataScience/Datasets/CityU Text/test_PreprocessText.py", line 1, in <module>
import PreprocessText
File "/Users/truongminh/Desktop/DataScience/Datasets/CityU Text/PreprocessText.py", line 1, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
Most of my packages was download via anaconda. I don't know if it might be the cause of this.

ImportError: No module named darkflow.cli

I just want to do live object recognition from web-came using YOLO and while testing it, I am facing some issues. I am using Ubuntu os. Here is the error I get in terminal.
rajan#RGR:~/yolo setup/YOLO_Object_Detection-master$ ./flow --model cfg/yolo-new.cfg --load bin/yolo-new.weights --demo videofile.avi
Traceback (most recent call last):
File "./flow", line 4, in <module>
from darkflow.cli import cliHandler
ImportError: No module named darkflow.cli
Here is the link of the git repository which I am using as refenrece:
https://github.com/llSourcell/YOLO_Object_Detection

How do I add python3 kernel to jupyter (Ipython) II

I've created the environment and Python 3.5.1 opens in bash, but isn't available to Notebook. I'm trying to follow this SO question to adding the Python3 kernel to Jupyter:
jupyter kernelspec install-self --user
Traceback (most recent call last):
File "/usr/local/bin/jupyter-kernelspec", line 7, in <module>
from jupyter_client.kernelspecapp import KernelSpecApp
ImportError: No module named jupyter_client.kernelspecapp
The link to this solution is dead. Anyone know what the process was?

Resources