Getting jupyter lab to run mojo on Apple Silicon
I'm unable to find the mojo kernal on VSCode Jupyter nor the web version of Jupyter Lab. What could I be missing?
The tutorial seems incorrect https://github.com/modularml/mojo/blob/main/examples/notebooks/README.md
VSCode seems to explicitly require a python environment. And
$MODULAR_HOME
is not a thing that exists
I also made a pull request towards the docs https://github.com/modularml/mojo/pull/3803 to clear up what I couldGitHub
mojo/examples/notebooks/README.md at main · modularml/mojo
The Mojo Programming Language. Contribute to modularml/mojo development by creating an account on GitHub.
GitHub
[Docs] Update the notebook tutorial by PunkPun · Pull Request #3803...
And add more clarification to end users not familiar with conda .yml files
7 Replies
Congrats @Pun, you just advanced to level 1!
I didn't found a way that I like but it is possible:
- be sure to be in a magic project (it's working when using
magic shell
, I suppose it's not mandatory if you find the right variables and the rights values)
- be sure to have installed max ipykernel and python in your magic env
- call code
from your shell (quit it before doing this just to be sure)
I'm quite certain there is a way to be more generic, but my testing until now were closer to alchemy than real reproductible science 😬
this seems to work, Jupyter extension just detects it.
I still seem to be struggling with older projects
ok
even
is enough.
Key is to have a mojo .ipynb in the directory, and also launch vscode from magic shell at least once
no need to magic install python or ipykernal separately
and it still doesn't work reliably!!!!!!!
this can also happen when you try to run it
I had this issue once, and fixed it by installing ipykernal 😬
(I think. maybe I didn't other install / config which I don't remember)