I am trying to run a Jupyter Notebook in VS Code for Windows and running into an issue with traitlets. Can anyone help?
Following steps to re-create:
- Start new Python virtual environment.
- Create new Jupyter Notebook (.ipynb file)
- Open file in VS Code for Windows and select virtual environment's interpreter.
- Try and run
print('hello')
in the first kernel.
The error message I get:
Failed to start the Kernel.
c:\Users\XX\python_projects\demo_issue\myenv\lib\site-packages\traitlets\traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
c:\Users\XX\python_projects\demo_issue\myenv\lib\site-packages\traitlets\traitlets.py:2157: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use '7518421c-2675-406f-81c8-3e4a669b0c20' instead of 'b"7518421c-2675-406f-81c8-3e4a669b0c20"'.
warn(
Bad file descriptor (C:\projects\libzmq\src\epoll.cpp:100).
View Jupyter log for further details.
I have tried to install an earlier version of traitlets (python -m pip install traitlets<5 --force-reinstall
) but it creates dependency conflicts:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
ipython 8.3.0 requires traitlets>=5, but you have traitlets 4.3.3 which is incompatible.
ipykernel 6.13.0 requires traitlets>=5.1.0, but you have traitlets 4.3.3 which is incompatible.
And I also get this error under the kernel:
The file 'myenv\lib\site-packages\traitlets\utils\__init__.py' seems to be overriding built in modules and interfering with the startup of the kernel. Consider renaming the file and starting the kernel again.
Click here for more info.
Here is a screenshot of the main issue, in case helpful.
Does anyone how any ideas of how I might fix? What am I doing wrong?
Thank you for any help you can give!