CARVIEW |
Select Language
HTTP/2 200
date: Wed, 23 Jul 2025 05:49:26 GMT
content-type: text/html; charset=utf-8
cache-control: max-age=0, private, must-revalidate
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
link: ; rel=preload; as=fetch; crossorigin=use-credentials
referrer-policy: no-referrer-when-downgrade
server-timing: issue_layout-fragment;desc="issue_layout fragment";dur=210.049452,issue_conversation_content-fragment;desc="issue_conversation_content fragment";dur=419.920414,issue_conversation_sidebar-fragment;desc="issue_conversation_sidebar fragment";dur=50.027041,nginx;desc="NGINX";dur=1.021844,glb;desc="GLB";dur=102.374927
strict-transport-security: max-age=31536000; includeSubdomains; preload
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With, Accept,Accept-Encoding, Accept, X-Requested-With
x-content-type-options: nosniff
x-frame-options: deny
x-voltron-version: fd8fbbc
x-xss-protection: 0
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=wdA8Rho1jOisTMcrdVyydNfdM1%2F9HxDm1QKT800mWu3dy4mLfS4zMIFkFXnOYnIDuYDV7OnLqJ7ukKDvAHpJE3FbwOONo0krO0ygRhSXt8A31ECJ5PfIgbVsU2L8Nxw94bgCO%2BlKlocmdj9pkTOi0X4QHTHLJpsV2WF8Bp7dtxYO43ESy9Tlve%2BeqJ7gg%2BdULw3UAq2rOnqdArsJDNtQXfXTwKhijQAON0CJ3LmejZyKbHXbI2Q877s%2FVmruF2TAPO3hSFSX8lYWXOGMpctnJg%3D%3D--hNKQe5A0vUlT4bdt--P64%2Ft8ccSQXSweX4sKdS9Q%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.125278148.1753249766; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 05:49:26 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 05:49:26 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: D5EA:36131:46D5CB:5D6EC9:688077E6
Waiting for ipykernel to be installed in terminal · Issue #2626 · microsoft/vscode-jupyter · GitHub
No one assignedNo labelsNo typeNo projectsNo milestoneNone yetNo branches or pull requests
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 333
Closed
Description
As discussed with @rchiodo @karthiknadig
Scenario:
- User starts notebook
- Runs a cell
- ipykernel is not installed in current environment
- We prompt user to install ipykernel and user clicks ok
- The installer sends the
python -m pip install ipykernel
(or similar) to the terminal
https://github.com/microsoft/vscode-python/blob/5c3433b6364db03fadbf58010937b65a23d106e5/src/client/common/installer/moduleInstaller.ts#L45 - Installer completes and resolves.
- Calling code assumes
ipykernel
has been installed - We attempt to start notebook, and kaboom.
Problem
- installer code returns even before the installation has completed
Cause
- We have no way to tell whether
terminal/shell
has completed executing our request
@int19h @karthiknadig Doesn't this sound familiar.
Proposed Solution
- Create a new subclass class that overrides the existing
sendCommand
method in TerminalServiceterminalService.sendCommand(pythonPath, args);
,- Fortunately we have a factory. So we can switch between the two in the factory class.
- That's one place to make a simple decision
- Ensure we have a generic Python file (
~/pythonFiles/execInShell.py
) as follows:
# Note: The command and arguments are hardcoded as a sample.
# These commands could be '/usr/desktop/bin/conda install ipykernel -y' or other
# print command to output in terminal so user can see what is being executed.
# These values will be passed as arguments to the file.
print('python -m pip install ipykernel')
try
# Signal completion of command with success state
open('started.log')
subprocess.check_call(["python", "-m", "pip", "install", "ipykernel"], stdout=sys.stdout, stderr=sys.stderr)
# Signal completion of command with success state
open('success.log')
except:
# Signal completion of command with error state
open('error.log')
- Next, send the command
python <fully qualified path>/execInShell.py python -m pip install ipykernel
to the terminal (all arguments passed toexecInShell.py
will be executed in subprocess.
Note: Terminal is has already been activated (current behavior). - Extension code will use the files to check whether the process has started, completed.
Notes:
- This allows us to send any script to the terminal and wait for it to run to completion.
- E.g.
python execInShell.py /usr/desktop/bin/conda install -n env1 ipykernel
- E.g.
python execInShell.py c:\wow\conda.exe install -n env1 ipykernel
Obviously the args will be escaped properly.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
Issue actions
You can’t perform that action at this time.