Open MaximeRivest opened 2 months ago
Having the same problem with the new magic
cli.
The old modular
cli installed some mojo SDK and config in the MODULAR_HOME directory which is required by the VSCode extension.
magic
does not do that which results in this problem.
Having the same problem using WSL and the new magic cli
me too :( If I try to run a jupyter notebook VScode enters a loop: Connecting to kernel .... I can run a .mojo file in VSCode through the debugger ( solution suggested by kapa.ai)
Some good news from me. I got vscode working on wsl2 as follow: in a project that was initialized with magic for a mojo project ( magic init hello-world --format mojoproject): magic shell magic add ipykernel vscode . open a new notebook, open a cell put in it print("hellow world") select the local mojo kernel , i.e. it has the path .magic/... NOT the user level one with path ~/.modular/... and bingo the cell processing worked for me! before adding ipykernel vscode was getting in an infinite loop.
versions details: (hello-world-2) syla@syla-laptop:/Apps/mojo/hello-world-2$ magic --version magic 0.3.1 - (based on pixi 0.29.0) (hello-world-2) syla@syla-laptop:/Apps/mojo/hello-world-2$ mojo --version mojo 24.5.0 (e8aacb95)
If one wants to "get-started" with mojo it is currently relatively easy to find our way to: https://docs.modular.com/mojo/manual/get-started.
Step 1 through 5 worked flawlessly.
Step 6 is where inconsistencies starts to arise. On the VS Code extension page. The "get started step" mention Install the Mojo SDK. If we don't do it we are warned it is not installed and invited to install it by clicking on blue install button. Unfortunately this only leads to modular main page where there is not mentions of SDK. A google search for mojo SDK or a search in the github repo leads to either: https://docs.modular.com/mojo/roadmap#mojo-sdk-known-issues or https://github.com/modularml/mojo/blob/b5391bae169c63d36e75f2ffa33c6dc6d8242f99/stdlib/README.md?plain=1#L11 or https://docs.modular.com/cli/#description (which mention we should used magic)
I am happy to use Magic :D but does that means I cannot use VSCode? Also, the jupyther notebook does not find mojo's kernel when using Magic.