microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.31k stars 293 forks source link

Unable to start session for kernel Python 3.8.5 32-bit #728

Closed leonarduschen closed 4 years ago

leonarduschen commented 4 years ago

Bug: Notebook Editor, Interactive Window, Editor cells

Unable to start session for kernel Python 3.8.5 32-bit ('venv': venv). Select another kernel to launch with.

Steps to cause the bug to occur

There is really nothing special here

  1. Clone repo and start VSCode
  2. Run python -m venv venv
  3. Switch interpreter to venv and restart terminal
  4. Create main.ipynb
  5. Install data-science package when automatically prompted
  6. Unable to start-session.

Actual behavior

Unable to start session for kernel Python 3.8.5 32-bit ('venv': venv). Select another kernel to launch with.

Expected behavior

Notebook runs!

Your Jupyter and/or Python environment

Please provide as much info as you readily know

Python Output

The notebook can't run so there is nothing to copy here. However, here is the installed package in the environment if it helps at all:

Package Version


argon2-cffi 20.1.0 attrs 20.1.0 backcall 0.2.0
bleach 3.1.5
cffi 1.14.2 colorama 0.4.3
decorator 4.4.2
defusedxml 0.6.0
entrypoints 0.3
flake8 3.8.3
ipykernel 5.3.4
ipython 7.18.1 ipython-genutils 0.2.0
ipywidgets 7.5.1
jedi 0.17.2 Jinja2 2.11.2 jsonschema 3.2.0 jupyter 1.0.0 jupyter-client 6.1.7 jupyter-console 6.2.0 jupyter-core 4.6.3 MarkupSafe 1.1.1 mccabe 0.6.1 mistune 0.8.4 nbconvert 5.6.1 nbformat 5.0.7 notebook 6.1.3 packaging 20.4 pandocfilters 1.4.2 parso 0.7.1 pickleshare 0.7.5 pip 20.1.1 prometheus-client 0.8.0 prompt-toolkit 3.0.7 pycodestyle 2.6.0 pycparser 2.20 pyflakes 2.2.0 Pygments 2.6.1 pyparsing 2.4.7 pyrsistent 0.16.0 python-dateutil 2.8.1 pywin32 228 pywinpty 0.5.7 pyzmq 19.0.2 qtconsole 4.7.6 QtPy 1.9.0 Send2Trash 1.5.0 setuptools 47.1.0 six 1.15.0 terminado 0.8.3 testpath 0.4.4 tornado 6.0.4 traitlets 5.0.0 wcwidth 0.2.5 webencodings 0.5.1 widgetsnbextension 3.5.1

Microsoft Data Science for VS Code Engineering Team: @rchiodo, @IanMatthewHuff, @DavidKutu, @DonJayamanne, @greazer, @joyceerhl

allsv commented 4 years ago

Hello, I'm having a similar issue. It happens with any kernel I try to choose. Attaching a dev console log -1598962107726.log

GitProfAn commented 4 years ago

Hello, almost the same issue:

Unable to start session for kernel Python 3.8.5 32-bit. Select another kernel to launch with.

Version: 1.48.2 (user setup) Commit: a0479759d6e9ea56afa657e454193f72aef85bd0 Date: 2020-08-25T10:13:11.295Z Electron: 7.3.2 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 6.3.9600

kernel issue

upd:

appdirs 1.4.4 argon2-cffi 20.1.0 astroid 2.4.2 attrs 20.1.0 autopep8 1.5.4 backcall 0.2.0 black 19.3b0 bleach 3.1.5 certifi 2020.6.20 cffi 1.14.2 chardet 3.0.4 click 7.1.2 colorama 0.4.3 cycler 0.10.0 decorator 4.4.2 defusedxml 0.6.0 docutils 0.16 entrypoints 0.3 idna 2.10 ipykernel 5.3.4 ipython 7.18.1 ipython-genutils 0.2.0 ipywidgets 7.5.1 isort 5.4.2 jedi 0.17.2 Jinja2 2.11.2 joblib 0.16.0 jsonschema 3.2.0 jupyter 1.0.0 jupyter-client 6.1.7 jupyter-console 6.2.0 jupyter-core 4.6.3 kiwisolver 1.2.0 lazy-object-proxy 1.5.1 MarkupSafe 1.1.1 matplotlib 3.3.1 mccabe 0.6.1 mistune 0.8.4 mpmath 1.1.0 nbconvert 5.6.1 nbformat 5.0.7 notebook 6.1.3 numpy 1.19.1 packaging 20.4 pandas 1.1.1 pandocfilters 1.4.2 parso 0.8.0 pickleshare 0.7.5 Pillow 7.2.0 pip 20.2.2 plotly 4.9.0 prometheus-client 0.8.0 prompt-toolkit 3.0.7 pycodestyle 2.6.0 pycparser 2.20 pycryptodome 3.9.8 Pygments 2.6.1 pylint 2.6.0 pyparsing 2.4.7 pyrsistent 0.16.0 python-dateutil 2.8.1 pytz 2020.1 pywin32 228 pywinpty 0.5.7 pyzmq 19.0.2 qtconsole 4.7.6 QtPy 1.9.0 requests 2.24.0 retrying 1.3.3 rstcheck 3.3.1 scikit-learn 0.23.2 scipy 1.5.2 Send2Trash 1.5.0 setuptools 50.0.0 simple-crypt 4.1.7 six 1.15.0 sklearn 0.0 terminado 0.8.3 testpath 0.4.4 threadpoolctl 2.1.0 toml 0.10.1 tornado 6.0.4 traitlets 5.0.0 urllib3 1.25.10 wcwidth 0.2.5 webencodings 0.5.1 widgetsnbextension 3.5.1 wrapt 1.12.1

liteform commented 4 years ago

Similar issue with Python 3.8.5 64-bit, not using venv output.txt

maciejpitucha commented 4 years ago

There is a workaround, you can use dependencies from an older workspace, if you have any. For example this set of requirements works in my case, but the updated ones not anymore. I don't know which version exactly causes the problem.

requirements.txt ``` absl-py==0.9.0 alembic==1.4.2 apispec==3.3.1 appdirs==1.4.4 astunparse==1.6.3 attrs==19.3.0 azure-core==1.6.0 azure-storage-blob==12.3.2 Babel==2.8.0 backcall==0.2.0 black==19.10b0 bleach==3.1.5 blinker==1.4 Boruta==0.3 cachetools==4.1.0 certifi==2020.6.20 cffi==1.14.0 chardet==3.0.4 click==7.1.2 cloudpickle==1.4.1 convertdate==2.2.1 country-currencies==0.2 coverage==5.1 cryptography==2.9.2 cycler==0.10.0 databricks-cli==0.11.0 decorator==4.4.2 defusedxml==0.6.0 Deprecated==1.2.10 distlib==0.3.0 docker==4.2.1 eli5==0.10.1 entrypoints==0.3 et-xmlfile==1.0.1 fastavro==0.24.0 fastparquet==0.4.0 filelock==3.0.12 future==0.18.2 gast==0.3.3 gitdb==4.0.5 google-auth==1.18.0 google-auth-oauthlib==0.4.1 google-pasta==0.2.0 gorilla==0.3.0 graphviz==0.14 grpcio==1.30.0 gunicorn==20.0.4 h5py==2.10.0 holidays==0.10.3 hyperopt==0.2.4 idna==2.9 importlib-metadata==1.6.1 ipdb==0.13.3 ipykernel==5.3.0 ipython==7.15.0 ipython-genutils==0.2.0 ipywidgets==7.5.1 isodate==0.6.0 itsdangerous==1.1.0 jdcal==1.4.1 jedi==0.17.1 jellyfish==0.8.2 Jinja2==2.11.2 joblib==0.16.0 jsonpointer==2.0 jsonschema==3.2.0 jupyter==1.0.0 jupyter-client==6.1.3 jupyter-console==6.1.0 jupyter-core==4.6.3 kafka-python==2.0.1 Keras-Preprocessing==1.1.2 kiwisolver==1.2.0 korean-lunar-calendar==0.2.1 llvmlite==0.33.0 Mako==1.1.3 Markdown==3.2.2 MarkupSafe==1.1.1 marshmallow==3.7.1 marshmallow-jsonschema==0.10.0 matplotlib==3.2.2 mistune==0.8.4 more-itertools==8.4.0 msgpack==1.0.0 msrest==0.6.16 nbconvert==5.6.1 nbformat==5.0.7 networkx==2.4 notebook==6.0.3 numba==0.50.0 numpy==1.19.1 oauthlib==3.1.0 openpyxl==3.0.1 opt-einsum==3.2.1 packaging==20.4 pandas==1.1.0 pandocfilters==1.4.2 parso==0.7.0 pathspec==0.8.0 pexpect==4.8.0 phonenumbers==8.12.7 pickleshare==0.7.5 Pillow==7.2.0 plotly==4.8.1 pluggy==0.13.1 prometheus-client==0.8.0 prometheus-flask-exporter==0.14.1 prompt-toolkit==3.0.5 protobuf==3.12.2 psutil==5.7.2 psycopg2-binary==2.8.5 ptvsd==4.3.2 ptyprocess==0.6.0 py==1.8.2 pyarrow==1.0.0 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycparser==2.20 Pygments==2.6.1 PyMeeus==0.3.7 pyparsing==2.4.7 pyrsistent==0.16.0 pytest==5.4.3 pytest-cov==2.10.0 python-dateutil==2.8.1 python-editor==1.0.4 pytz==2020.1 PyYAML==5.3.1 pyzmq==19.0.1 qtconsole==4.7.5 QtPy==1.9.0 querystring-parser==1.2.4 regex==2020.6.8 requests==2.24.0 requests-oauthlib==1.3.0 responses==0.10.15 retrying==1.3.3 rfc3339-validator==0.1.2 rfc3986-validator==0.1.1 rsa==4.6 scikit-learn==0.23.1 scipy==1.4.1 seaborn==0.10.1 Send2Trash==1.5.0 sentry-sdk==0.16.3 shap==0.35.0 six==1.15.0 smmap==3.0.4 tabulate==0.8.7 termcolor==1.1.0 terminado==0.8.3 testpath==0.4.4 threadpoolctl==2.1.0 thrift==0.13.0 toml==0.10.1 tornado==6.0.4 traitlets==4.3.3 typed-ast==1.4.1 typing-extensions==3.7.4.2 urllib3==1.25.9 uWSGI==2.0.19.1 virtualenv==20.0.25 wcwidth==0.2.5 webargs==5.5.3 webcolors==1.11.1 webencodings==0.5.1 websocket-client==0.57.0 widgetsnbextension==3.5.1 wrapt==1.12.1 zipp==3.1.0 ```
Krendelev commented 4 years ago

There is a workaround, you can use dependencies from an older workspace, if you have any. For example this set of requirements works in my case, but the updated ones not any more. I don't know which version exactly causes the problem.

Actually just pip install notebook==6.0.3 works for me

Edit: complete requirements.txt that works, few packages downgraded. requirements.txt

kazumov commented 4 years ago

@Krendelev Unfortunately this workaround isn't working for me.

TarjinderSingh commented 4 years ago

Just want to echo I have the same issue starting this morning and it seems like microsoft/vscode-jupyter#685 may be referring to the same problem.

Melkaz commented 4 years ago

Strangely, this bug is also present when using devcontainers. It doesn't seem to be linked to the version of Python.

IanMatthewHuff commented 4 years ago

Looking into it now. The logs that I've seen all have signature mismatch issues.

IanMatthewHuff commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

IanMatthewHuff commented 4 years ago

If this works (or doesn't) for you please post back as I have only my data point to work with.

IanMatthewHuff commented 4 years ago

https://github.com/ipython/traitlets/issues/608

liteform commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

Confirming that this resolves the issue. Thank you for looking into it.

cnpryer commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

Confirmed on my end (Python3.8.5 64-bit; Windows).

GitProfAn commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

This really helped!

hoangdng commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

Thank you very much

pseudopunit commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

I just started today with VScode+jupyter (was already in with anaconda). This issue really tired me up and took my 4-5 hours to get to this post. FIrstly there was some compatibility issue with conda env kernel and then this stuff came up. but this solution saved my day. Thanks a lot

kazumov commented 4 years ago

Thank you very much! It is working now. Quotation marks are not necessary:

python3 -m pip install traitlets==4.3.3 --force-reinstall

or

pip3 install traitlets==4.3.3 --force-reinstall

On Tue, Sep 1, 2020 at 11:56 AM liteform notifications@github.com wrote:

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

Confirming that this resolves the issue. Thank you for looking into it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-python/issues/13701#issuecomment-684998235, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACM2HQQAJZTBZHEHLI243SLSDURSLANCNFSM4QQ4BE3Q .

gonzaplazag commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

perfect for me! thanks!

ihatedwang commented 4 years ago

I feel like I'm missing something? When I run python -m pip install 'traitlets==4.3.3' --force-reinstall and then open up VS Code and start up a new notebook, it tells me Data Science library ipykernel is not installed. Install? And if I select "Yes" it will update and then send me back to the Unable to start session for kernel Python 3.8.5 32-bit. Basically putting me in a loop.

leonarduschen commented 4 years ago

python -m pip install 'traitlets==4.3.3' --force-reinstall confirmed to work for me. Thanks a lot.

Python 3.8.5 32-bit on Windows 10 64-bit

someoneonboard1 commented 4 years ago

python3 -m pip install traitlets==4.3.3 --force-reinstall worked for me as well. Python 3.8.2 64-bit on Windows 10 64-bit

pseudopunit commented 4 years ago

I feel like I'm missing something? When I run python -m pip install 'traitlets==4.3.3' --force-reinstall and then open up VS Code and start up a new notebook, it tells me Data Science library ipykernel is not installed. Install? And if I select "Yes" it will update and then send me back to the Unable to start session for kernel Python 3.8.5 32-bit. Basically putting me in a loop.

Go to vscode (change the python interpreter to what you want), then run python -m pip install ipykernel and then do the degradation by python -m pip install 'traitlets==4.3.3' --force-reinstall

because when you are degrading it first then the installation of ipykernel updates it again nullfying your degradation

breyton commented 4 years ago
Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install:
https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version:
python -m pip install 'traitlets==4.3.3' --force-reinstall
Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

Confirmed on my end (Python3.8.5 64-bit; Windows).

"python -m pip install traitlets==4.3.3 --force-reinstall --user" It works perfectly now! Thanks very much!!!!!

allsv commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

also works for me, thank you!

victor-aunon commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

It worked, thanks!

Victsz commented 4 years ago

Thank you very much! It is working now. Quotation marks are not necessary: python3 -m pip install traitlets==4.3.3 --force-reinstall or pip3 install traitlets==4.3.3 --force-reinstall On Tue, Sep 1, 2020 at 11:56 AM liteform @.***> wrote: Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start). Confirming that this resolves the issue. Thank you for looking into it. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#13701 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACM2HQQAJZTBZHEHLI243SLSDURSLANCNFSM4QQ4BE3Q .

Really worked!

ihatedwang commented 4 years ago

Go to vscode (change the python interpreter to what you want), then run python -m pip install ipykernel and then do the degradation by python -m pip install 'traitlets==4.3.3' --force-reinstall

because when you are degrading it first then the installation of ipykernel updates it again nullfying your degradation

Well, like I said, I seem to be stuck in a loop. if I install ipykernel, then I can't start a session. So then I need to do the degradation. But the problem here is that if I degrade it, vscode keeps telling me that I don't have an ipykernel installed. Therefore, it still doesn't work.

Here's the other thing, after running python -m pip install 'traitlets==4.3.3' --force-reinstall, if I were to install ipykernel with pip, nothing happens as all my requirement are satisfied. Its just that if I try to select an interpreter for notebooks, again, vscode will force me to install Data Science library ipykernel and it will add Installing collected packages: ipython-genutils, traitlets, six, decorator. This seems to be the only difference between installing through VS Code and using python -m pip install ipykernel.

I should also add that this is my first time installing and running notebooks on vscode, so I don't have any older versions to revert back to maybe? I'm honestly not sure what's going on.

IanMatthewHuff commented 4 years ago

@dwang040 Sounds like you are dealing with a different issue here. Could you please file a new issue on this? Also turning Python->Logging->Level setting to 'debug' and then including the contents of the Output:Python window could help us to diagnose this.

pedrom505 commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

Also works very well for me, thanks

If someone here is using pipenv to manage your packages, use the command below to install this package

pipenv install jupyter pipenv install traitlets==4.3.3

With both commands you can create the complete environment to work with jupyter notebook on vscode.

isabella-munhoz commented 4 years ago

OMG!!!! You guys have just saved my life!!!! I've been trying to solve this problem for HOURS!!!!

I'm using Ubuntu 20.04. I've installed jupyter using "sudo pip3 install jupyter" in the terminal and jupyter notebook was working completely fine in the browser. However, when I tried to create a notebook in VSCode I got the message "Connecting to IPython kernel: Connecting to kernel", and, after some minutes, the message "Unable to start session for kernel python 3.8".

As suggested here, first I exited VSCode. Then I checked the version of "traitlets" installed, using the following command in ubuntu terminal:

$ pip3 freeze | grep traitlets

And it was installed some 5 version...

Then, I used the following command in ubuntu terminal:

$ sudo pip3 install "traitlets==4.3.3" --force-reinstall

Reopened VSCode and ran a notebook! Worked PERFECTLY!!!!

Thank you very much you all, specially @IanMatthewHuff !!!!

DigDogData commented 4 years ago

Worked for me too - python 3.8.5 on 64-bit windows10

harrywang commented 4 years ago

If this works (or doesn't) for you please post back as I have only my data point to work with.

Thanks a lot! this solved my problem:

Unable to start session for kernel Python 3.7.7 64-bit ('venv': venv). Select another kernel to launch with.

barretoana commented 4 years ago

Thank you very much! It is working now. Quotation marks are not necessary: python3 -m pip install traitlets==4.3.3 --force-reinstall or pip3 install traitlets==4.3.3 --force-reinstall

This worked - 3.8.3 64bit MacOS, thank you! :)

JoShMiQueL commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

Works for me 👍

brybalicious commented 4 years ago

This worked for me, following the instructions for Pipenv mentioned by @pedrom505

Thank you!!

raaaaaymond commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

Worked for me, thank you! But is there anyone working on a more permanent fix that works with the latest version of traitlets and other things?

Thomas-van-der-Molen commented 4 years ago

Hi, I tried the solutions above, but they did not work for me. I also tried the solutions here, but they did not work either. I'm very new to visual studio so all help is appreciated. Thank you!

dcsw commented 4 years ago

Worked easily and well for me. Many thanks @IanMatthewHuff and team!

arvindpatel24 commented 4 years ago

python -m pip install 'traitlets==4.3.3' --force-reinstall Yes it worked for me as well :-)

minrk commented 4 years ago

This should be fixed with latest traitlets 5.0.4, out earlier today. I haven't been able to confirm directly, since I don't know how to trigger the relevant code path myself, but manually executing a similar command-line is fixed with 5.0.4.

But is there anyone working on a more permanent fix that works with the latest version of traitlets and other things?

This extension shouldn't need any updating, but the relevant change is that this b' prefix for configuring Bytes on the command-line is no longer required and support is deprecated (with no plans for removal). The bug was in traitlets 5,<5.0.4 not properly implementing the deprecated support for this prefix. It can be dropped if/when traitlets >=5.0 is required, but until then no changes are necessary. I wouldn't rush, though, as pinning down is likely to be a common practice as bugs are worked out during a transition period.

jrph commented 4 years ago

This should be fixed with latest traitlets 5.0.4, out earlier today. I haven't been able to confirm directly, since I don't know how to trigger the relevant code path myself, but manually executing a similar command-line is fixed with 5.0.4.

But is there anyone working on a more permanent fix that works with the latest version of traitlets and other things?

This extension shouldn't need any updating, but the relevant change is that this b' prefix for configuring Bytes on the command-line is no longer required and support is deprecated (with no plans for removal). The bug was in traitlets 5,<5.0.4 not properly implementing the deprecated support for this prefix. It can be dropped if/when traitlets >=5.0 is required, but until then no changes are necessary. I wouldn't rush, though, as pinning down is likely to be a common practice as bugs are worked out during a transition period.

-This worked for me

logicalpath commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

This worked for me - Thank you! Python 3.8.5 MacOS 10.15.6

xiubert commented 4 years ago

I had traitlets 4.3.3 installed already, so I tried upgrading. In the respective conda env, I upgraded traitlets to 5.0.4 and still get the kernelspec error unless I open vscode via the anaconda3 command prompt.

Interestingly this issue is not present when I run an interpreter on the host from a remote client via the SSH remote extension

python 3.7.7 vs code 1.49 win10 x64

murenei commented 4 years ago

Worked for me. Thanks! Python 3.8.5 vscode 1.49 win10 x64

kky5 commented 4 years ago

Hope to solve this problem, I spent a long time to solve this problem, but those who did not see this page are not so lucky, maybe they will give up using VSCODE's jupyter notebook function

matercomus commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

WORKED! Thank You :))

axisymmetric commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

This is great! Fixed the issue. Cheers!

ChrisMacaluso commented 4 years ago

Hey folks. In my local testing I believe that it was this update here to 5.0.0, which is picked up as part of our ipykernel install: https://pypi.org/project/traitlets/#history

In an activated environment that is not working try the following to drop it back to the older version: python -m pip install 'traitlets==4.3.3' --force-reinstall Make sure to have VS Code closed (as we sometimes are starting a kernel in the background, this will make sure that you pick up the install fresh the next time that you start).

traitlets==4.3.3 worked for me also thank you!

agilityvision commented 4 years ago

This should be fixed with latest traitlets 5.0.4, out earlier today.

I can confirm that upgrade to 5.0.4 fixed it for me: pip3 install -U traitlets