This is the error message displayed when I run the code in Interactive window in vs code:
C:\Users\rohit\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2195: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode. warn( C:\Users\rohit\AppData\Roaming\Python\Python38\site-packages\traitlets\traitlets.py:2150: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '8fe74386-11f1-4831-b37d-5582442edf8a' instead of 'b"8fe74386-11f1-4831-b37d-5582442edf8a"'. warn( Traceback (most recent call last): File "c:\Users\rohit.vscode\extensions\ms-toolsai.jupyter-2021.5.702919634\pythonFiles\vscode_datascience_helpers..\pyvsc-run-isolated.py", line 30, in runpy.run_path(module, run_name="main") File "F:\Anaconda\lib\runpy.py", line 265, in run_path return _run_module_code(code, init_globals, run_name, File "F:\Anaconda\lib\runpy.py", line 97, in _run_module_code _r...
I tried re-installing VS code (In another DRIVE F:). I am using python(conda) interpreter.
Issue:
Kernel died with exit code 1073741845.
1. c:\anaconda\envs\my_env\lib\site-packages\traitlets\ traitlets.py :2196: FutureWarning: Supporting extra quotes around Unicode is deprecated in traitlets 5.0. Use 'hmac-sha256' instead of '"hmac-sha256"' – or use CUnicode.
2. warn( c:\anaconda\envs\my_env\lib\site-packages\traitlets\traitlets.py:2151: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '7aa5b615-129a-4e47-b483-0954be3b7001' instead of 'b"7aa5b615-129a-4e47-b483-0954be3b7001"'.
3. warn( Bad file descriptor (bundled\zeromq\src\epoll.cpp:100)
Solution:
To solve 1. & 2. using the following commend in vscode python terminal:
python -m pip install traitlets==4.3.3 --force-reinstall (maybe need run 2 times and shows successfully install)
just reinstall the traitlets to the lower version.
To solve 3. using the following commend in vscode python terminal:
python -m pip install pyzmq==19.0.2 --force-reinstall (maybe need run 2 times and shows successfully install)
just reinstall the pyzmq to the lower version.
This fix it from terminal
pip install pywin32==228
Also a solution here:
conda install ipykernel --update-deps --force-reinstall
1-Open Vs code choose your Kernal and Reinstall ipykenel
(Don't press anything keep reinstall till it works) Keep your kernal open while you doing this step by opening any notebook in the browser using Jupiter notebook normally And it will Work
or
Go to terminal open it as admin.
this worked for me
In addition to what THE TECHIE HAND recommended- I opened a python terminal in VS Code and launched jupyter notebook from there. It opened in my web browser and allowed me to set a python 3 kernel, which then enabled Jupyter to work in VS Code.
Open your VS code, uninstall Python and Jupyter extensions and reinstall them again.
This problem has occured to me as well , In my case I had code.py file removing it had seemed to have solved my problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With