Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The conda virtual environment kernel that vscode remotely connects to the server cannot run. The cell prompts that ipykernel is needed #15718

Closed
jackwky opened this issue May 26, 2024 · 3 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-kernel Kernels issues (start/restart/switch, install ipykernel) user-setup Issues caused by incorrectly configured python environments, packages, or the like

Comments

@jackwky
Copy link

jackwky commented May 26, 2024

<! -- Please search existing issues to avoid creating duplicates. -->

Environment data

  • VS Code version: 1.89.1
  • Jupyter Extension version (available under the Extensions sidebar): v2024.4.0
  • Python Extension version (available under the Extensions sidebar): v2024.6.0
  • OS (Windows | Mac | Linux distro) and version: Linux version 6.5.0-35 22.04.1-Ubuntu
  • Python and/or Anaconda version: 3.7.12
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
  • Jupyter server running: Remote

Expected behaviour

The.ipynb file is ready to run

Actual behaviour

The.ipynb file cannot be run
Tip: Running a cell with "XXX (Python 3.7.12)" requires the ipykernel package.
Install "ipykernel" into your Python environment by running the following command.
Run the conda install -n selfocc ipykernel --update-deps --force-reinstall command.
However, I have an ipykernel package in envs

pip install -U ipykernel -i https://pypi.tuna.tsinghua.edu.cn/simple/
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Requirement already satisfied: ipykernel in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (6.16.2)
Requirement already satisfied: debugpy>=1.0 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (1.6.3)
Requirement already satisfied: ipython>=7.23.1 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (7.33.0)
Requirement already satisfied: jupyter-client>=6.1.12 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (7.4.9)
Requirement already satisfied: matplotlib-inline>=0.1 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (0.1.7)
Requirement already satisfied: nest-asyncio in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (1.6.0)
Requirement already satisfied: packaging in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (23.2)
Requirement already satisfied: psutil in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (5.9.3)
Requirement already satisfied: pyzmq>=17 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (24.0.1)
Requirement already satisfied: tornado>=6.1 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (6.2)
Requirement already satisfied: traitlets>=5.1.0 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipykernel) (5.9.0)
Requirement already satisfied: setuptools>=18.5 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipython>=7.23.1->ipykernel) (59.5.0)
Requirement already satisfied: jedi>=0.16 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipython>=7.23.1->ipykernel) (0.19.1)
Requirement already satisfied: decorator in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipython>=7.23.1->ipykernel) (5.1.1)
Requirement already satisfied: pickleshare in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipython>=7.23.1->ipykernel) (0.7.5)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipython>=7.23.1->ipykernel) (3.0.42)
Requirement already satisfied: pygments in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipython>=7.23.1->ipykernel) (2.17.2)
Requirement already satisfied: backcall in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipython>=7.23.1->ipykernel) (0.2.0)
Requirement already satisfied: pexpect>4.3 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from ipython>=7.23.1->ipykernel) (4.9.0)
Requirement already satisfied: entrypoints in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from jupyter-client>=6.1.12->ipykernel) (0.4)
Requirement already satisfied: jupyter-core>=4.9.2 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from jupyter-client>=6.1.12->ipykernel) (4.12.0)
Requirement already satisfied: python-dateutil>=2.8.2 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from jupyter-client>=6.1.12->ipykernel) (2.9.0)
Requirement already satisfied: parso<0.9.0,>=0.8.3 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from jedi>=0.16->ipython>=7.23.1->ipykernel) (0.8.4)
Requirement already satisfied: ptyprocess>=0.5 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from pexpect>4.3->ipython>=7.23.1->ipykernel) (0.7.0)
Requirement already satisfied: wcwidth in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=7.23.1->ipykernel) (0.2.10)
Requirement already satisfied: six>=1.5 in /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages (from python-dateutil>=2.8.2->jupyter-client>=6.1.12->ipykernel) (1.16.0)

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. XXX

<! --
Note: If you think a GIF of what is happening would be helpful, consider tools like ht

@jackwky jackwky added the bug Issue identified by VS Code Team member as probable bug label May 26, 2024
@jackwky
Copy link
Author

jackwky commented May 26, 2024

use Jupyter: Select Interpreter to Start Jupyter Server
error : Running a cell with "XXX (Python 3.7.16)" requires the kernelspec package.

@jackwky
Copy link
Author

jackwky commented May 26, 2024

ImportError: /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages/zmq/backend/cython/../../../../.././libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages/zmq/backend/cython/../../../../../libzmq.so.5)

@DonJayamanne
Copy link
Contributor

thank you for filing this issue and sorry you are running into this issue.

GLIBCXX_3.4.29' not found (required by /home/a/anaconda3/envs/selfocc/lib/python3.7/site-packages/zmq/backend/cython/../../../../../libzmq.so.5)

This is a problem with the installation of the ipykernel package and related dependencies.
Unfortunately this isn't something we control, I would suggest trying to install this using conda

Using pip to install packages into conda will lead to issues, if you prefer using pip, then I would suggest using virtual envs.
In my experience, when using conda envs, you should use conda to install the packages.
Finally python 3.7 is no longer supported, I would suggest upgrading to a more recent version.
See supported versions here https://devguide.python.org/versions/

@DonJayamanne DonJayamanne added notebook-kernel Kernels issues (start/restart/switch, install ipykernel) user-setup Issues caused by incorrectly configured python environments, packages, or the like labels May 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug notebook-kernel Kernels issues (start/restart/switch, install ipykernel) user-setup Issues caused by incorrectly configured python environments, packages, or the like
Projects
None yet
Development

No branches or pull requests

2 participants