question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Isomorphic IInstaller: Support installing dependencies with the debugger

See original GitHub issue

With PR: https://github.com/microsoft/vscode-jupyter/pull/10604 we realized that to have an isomorphic dependency installer we will need to use the debugger.

We have a dependency installer that has a nicer user experience, which is the IInstaller. If we were to implement an isomorphic installer, we would both use the debugger and IInstaller.

An important point to consider is that the code below does not work with the debugger:

// TODO: Installing pandas does not work with the debugger.
// It takes a long time, then it breaks with:
// error: Command \"clang -Wno-unused-result -Wsign-compare -Wunreachable-code...
export const debuggerInstallPandas = [
    'import subprocess as _VSCODE_subprocess',
    'import sys as _VSCODE_sys',
    `def _VSCODE_install_pandas():
  _VSCODE_subprocess.check_call([_VSCODE_sys.executable, "-m", "pip", "install", "pandas"])`,
    '_VSCODE_install_pandas()',
    'del _VSCODE_subprocess, _VSCODE_sys, _VSCODE_install_pandas'
];

To correctly implement the isomorphic installer, we might need to study how %pip and %conda are implemented on Jupyter.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Jun 28, 2022

It’s frozen. So you need to eval some code from the debugger.

Aah yes, you’re right, forgot about that one (thought that only applies to debugging remote kernels, but not a consistent experience if we don’t support remote).

1reaction
rchiodocommented, Jun 28, 2022

Even with an IKernel, if you’re debugging a cell or debugging the IW, you can’t use the kernel to do the install. It’s frozen. So you need to eval some code from the debugger.

Maybe we just skip installing when debugging then. Although I think the install magics wouldn’t be very hard to call: https://github.com/ipython/ipython/blob/0f4a73c91db71cde174275337fc5e226acc9dd7d/IPython/core/magics/packaging.py

Read more comments on GitHub >

github_iconTop Results From Across the Web

Universal dependency installer (and universal debugger code ...
To have an IInstaller that supports installing dependencies given an IKernel and a DebuggerSession . The installer should show the ...
Read more >
How to make VS Code have some extensions installed by ...
Is there a way that I embed these dependencies and extensions once inside my docker image, so that they are there always? Because...
Read more >
webpack-isomorphic-tools - npm
Dev Dependencies (14) · Install · Repository · Homepage · Weekly Downloads · Version · License · Unpacked Size · Total Files.
Read more >
@nasc/furtherjs NPM | npm.io
Add support for debugging the server ... Support nsp (for server security) ... Keep in mind that furtherjs will install its own dependencies...
Read more >
Configuring TypeScript, Express, Jest, Payload, and VSCode ...
Bring in Jest, VSCode debugging, and a headless CMS - and there are many moving parts. ... Install these dependencies by running:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found