skip to Main Content

enter image description here

OS: Arch linux(termux proot)
Python version: 3.10.8

My error message as follow

Visual Studio Code (1.73.1, undefined, desktop)
Jupyter Extension Version: 2022.9.1303220346.
Python Extension Version: 2022.18.2.
Workspace folder /home/jack/Documents/Medical-segmentation
info 15:00:11.430: ZMQ install verified.
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 15:00:12.217: LSP Notebooks experiment is disabled -- not in treatment group
info 15:00:13.731: Got empty env vars with python /bin/python in 1275ms
info 15:00:13.731: Got env vars ourselves faster /bin/python with env var count 59 in 1276ms
info 15:00:13.768: Process Execution: > /bin/python -m pip list
> /bin/python -m pip list
info 15:00:22.102: Starting interactive window for resource '/home/jack/Documents/Medical-segmentation/snakes/example2.py'
info 15:00:22.512: Preferred Remote kernel for Interactive-1.interactive is undefined
info 15:00:25.004: Process Execution: > /bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/pythonFiles/normalizeSelection.py
> /bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/pythonFiles/normalizeSelection.py
info 15:00:25.022: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd0e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a./bin/python./bin/python.-m#ipykernel_launcher (Python Path: , EnvType: Global, EnvName: '', Version: 3.10.8) for 'Interactive-1.interactive' (disableUI=false)
info 15:00:25.024: Computing working directory for resource '/home/jack/Documents/Medical-segmentation/snakes/example2.py'
info 15:00:25.054: Got env vars ourselves faster /bin/python with env var count 59 in 2ms
info 15:00:25.108: Process Execution: > /bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
> /bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
info 15:00:25.266: Got env vars ourselves faster /bin/python with env var count 59 in 14ms
info 15:00:25.266: Got env vars ourselves faster /bin/python with env var count 59 in 6ms
info 15:00:25.308: Process Execution: > /bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"a946baa0-e0d4-41d4-b72d-1eed7330e6f9" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/jack/.local/share/jupyter/runtime/kernel-v2-32230pKMrdOglR18w.json
> /bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"a946baa0-e0d4-41d4-b72d-1eed7330e6f9" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/jack/.local/share/jupyter/runtime/kernel-v2-32230pKMrdOglR18w.json
info 15:00:25.308: Process Execution: cwd: ~/Documents/Medical-segmentation/snakes
cwd: ~/Documents/Medical-segmentation/snakes
info 15:00:25.823: Registering dummy command feature
info 15:00:27.946: ipykernel version & path 6.18.0, /usr/lib/python3.10/site-packages/ipykernel/__init__.py for /bin/python
info 15:00:29.175: Got empty env vars with python /bin/python in 4123ms
info 15:00:29.176: Got empty env vars with python /bin/python in 3924ms
info 15:00:29.176: Got empty env vars with python /bin/python in 3916ms
warn 15:00:33.920: StdErr from Kernel Process /usr/lib/python3.10/site-packages/traitlets/traitlets.py:2412: 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(

warn 15:00:33.921: StdErr from Kernel Process /usr/lib/python3.10/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'a946baa0-e0d4-41d4-b72d-1eed7330e6f9' instead of 'b"a946baa0-e0d4-41d4-b72d-1eed7330e6f9"'.
  warn(

warn 15:00:33.964: StdErr from Kernel Process Permission denied (src/ip_resolver.cpp:542)

error 15:00:33.979: Disposing kernel process due to an error o [Error]: The kernel died. Error: /usr/lib/python3.10/site-packages/traitlets/traitlets.py:2412: 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(
/usr/lib/python3.10/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'a946baa0-e0d4-41d4-b72d-1eed7330e6f9' instead of 'b"a946baa0-e0d4-41d4-b72d-1eed7330e6f9"'.
  warn(
Permission denied (src/ip_resolver.cpp:542)... View Jupyter [log](command:jupyter.viewOutput) for further details.
    at ChildProcess.<anonymous> (/home/jack/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2195101)
    at ChildProcess.emit (node:events:538:35)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
  category: 'kerneldied',
  kernelConnectionMetadata: {
    kind: 'startUsingPythonInterpreter',
    kernelSpec: {
      specFile: '/home/jack/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/temp/jupyter/kernels/python3108jvsc74a57bd0e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a/kernel.json',
      interpreterPath: '/bin/python',
      isRegisteredByVSC: 'registeredByNewVersionOfExt',
      name: 'python3108jvsc74a57bd0e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a',
      argv: [Array],
      language: 'python',
      executable: 'python',
      display_name: 'Python 3.10.8 64-bit',
      metadata: [Object],
      env: {}
    },

I encounter this error message but I does not have any issue in another termux proot system. I remove all python and packages and reinstall. It didn’t work for me.

11/24 updated:
It’s weird because I look to another system by using pip list. It’s the same version with I currently use system.

Package                Version
---------------------- -----------
aiohttp                3.8.3
aiohttp-socks          0.7.1
aiorpcX                0.22.1
aiosignal              1.2.0
anyio                  3.6.2
appdirs                1.4.4
argon2-cffi            21.3.0
argon2-cffi-bindings   21.2.0
asttokens              2.1.0
async-generator        1.10
async-timeout          4.0.2
attrs                  22.1.0
autocommand            2.2.2
Babel                  2.11.0
backcall               0.2.0
beautifulsoup4         4.11.1
bitstring              3.1.9
black                  22.10.0
bleach                 5.0.1
build                  0.9.0
certifi                2022.9.24
cffi                   1.15.1
chardet                5.0.0
charset-normalizer     3.0.0
click                  8.1.3
codespell              0.0.0
comm                   0.1.0
commonmark             0.9.1
contourpy              1.0.6
cryptography           38.0.1
cycler                 0.11.0
Cython                 0.29.32
debugpy                1.6.3
decorator              5.1.1
defusedxml             0.7.1
deprecation            2.1.0
dnspython              2.2.1
docopt                 0.6.2
docutils               0.19
ecdsa                  0.18.0
Electrum               4.3.1
entrypoints            0.4
executing              1.2.0
fastjsonschema         2.16.2
flake8                 5.0.4
flake8-black           0.3.3
flake8-isort           5.0.0
fonttools              4.38.0
frozenlist             1.3.1
future                 0.18.2
greenlet               1.1.3.post0
idna                   3.4
imageio                2.22.4
imutils                0.5.4
inflect                6.0.2
installer              0.5.1
ipykernel              6.18.0
ipython                8.6.0
ipython-genutils       0.2.0
isort                  5.10.1
jaraco.context         4.1.2
jaraco.functools       3.5.2
jaraco.text            3.11.0
jedi                   0.18.1
Jinja2                 3.1.2
json5                  0.9.10
jsonrpclib-pelix       0.4.3.2
jsonschema             4.17.1
jupyter_client         7.4.7
jupyter_core           5.0.0
jupyter_packaging      0.12.3
jupyter-server         1.23.3
jupyterlab             3.5.0
jupyterlab-pygments    0.2.2
jupyterlab_server      2.16.3
kiwisolver             1.4.4
lxml                   4.9.1
mackup                 0.8.36
markdown-it-py         2.1.0
MarkupSafe             2.1.1
matplotlib             3.6.2
matplotlib-inline      0.1.6
mccabe                 0.7.0
mdurl                  0.1.2
mistune                2.0.4
more-itertools         9.0.0
msgpack                1.0.4
multidict              6.0.2
mypy-extensions        0.4.3
mysql-connector-python 8.0.31
nbclassic              0.4.8
nbclient               0.7.0
nbconvert              7.2.5
nbformat               5.7.0
nest-asyncio           1.5.6
networkx               2.8.8
nibabel                4.0.2
notebook               6.5.2
notebook_shim          0.2.2
numpy                  1.23.4
ordered-set            4.1.0
packaging              21.3
pandas                 1.5.1
pandocfilters          1.5.0
parso                  0.8.3
pathspec               0.10.1
pbkdf2                 1.3
pep517                 0.13.0
pexpect                4.8.0
pickleshare            0.7.5
pikaur                 1.13
Pillow                 9.3.0
pip                    22.3
platformdirs           2.5.2
pluggy                 1.0.0
ply                    3.11
portalocker            2.6.0
progressbar2           4.2.0
prometheus-client      0.15.0
prompt-toolkit         3.0.33
protobuf               4.21.7
psutil                 5.9.4
ptyprocess             0.7.0
pure-eval              0.2.2
pyaes                  1.6.1
pyalpm                 0.10.6
pycodestyle            2.9.1
pycparser              2.21
pycryptodomex          3.12.0
pydantic               1.10.2
pyflakes               2.5.0
Pygments               2.13.0
pynvim                 0.4.3
pyparsing              3.0.9
PyQt5                  5.15.7
PyQt5-sip              12.11.0
pyrsistent             0.19.2
PySocks                1.7.1
python-dateutil        2.8.2
python-dotenv          0.21.0
python-lsp-jsonrpc     1.0.0
python-lsp-server      1.5.0
python-socks           2.0.3
python-utils           3.4.5
pytz                   2022.5
pytz-deprecation-shim  0.1.0.post0
PyWavelets             1.4.1
pyzmq                  24.0.1
qrcode                 7.3.1
regex                  2022.10.31
requests               2.28.1
requests-unixsocket    0.3.0
ruamel.yaml            0.17.21
ruamel.yaml.clib       0.2.7
scikit-image           0.19.3
scipy                  1.9.3
Send2Trash             1.8.0
setuptools             63.2.0
Shapely                1.8.2
six                    1.16.0
sniffio                1.3.0
soupsieve              2.3.2.post1
SQLAlchemy             1.4.43
stack-data             0.6.1
TBB                    0.2
terminado              0.17.0
testpath               0.6.0
tifffile               2022.10.10
tinycss2               1.2.1
toml                   0.10.2
tomli                  2.0.1
tomlkit                0.11.6
tornado                6.2
traitlets              5.5.0
trove-classifiers      2022.10.19
typing_extensions      4.4.0
tzdata                 2022.6
tzlocal                4.2
uc-micro-py            1.0.1
ujson                  5.5.0
urllib3                1.26.12
validate-pyproject     0.10.1
wcwidth                0.2.5
webencodings           0.5.1
websocket-client       1.4.1
wheel                  0.37.1
yarl                   1.8.1

2

Answers


    1. Open your vscode and reinstall the Python and Jupyter Notebook extensions.
    2. Reinstall ipykernel package in the terminal.

    At the same time, this issue also proposes other solutions.

    Added:

    I encountered the same problem with traitlets==4.3.3. I updated it by using pip install traitlets and it’s version is 5.5.0 to solve this problem.

    Login or Signup to reply.
  1. I didn’t find a way to fix this within Arch itself, but I believe it has something to do with how Arch saves sockets to systemd, which is not accessible in proot, thus the permission denied error. However, as termux can run ipykernel successfully, and you have access to termux directories in proot arch, you can simply do this:

    1. create venv in termux home: python -m venv env-name
    2. activate venv in termux: source ~/env-name/bin/activate
    3. install ipykernel: pip install ipykernel
    4. activate venv in arch: source /data/data/com.termux/files/home/env-name/bin/activate
    5. add venv as kernel: python -m ipykernel install --user --name env-name
    6. select kernel in vscode
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search