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

Not working in Google Colab #5

Open
qubit55 opened this issue Feb 27, 2025 · 1 comment
Open

Not working in Google Colab #5

qubit55 opened this issue Feb 27, 2025 · 1 comment

Comments

@qubit55
Copy link

qubit55 commented Feb 27, 2025

Hello,

I'm trying to set up the Basilisp kernel in Google Colab but ran into an issue.

The kernel installs fine via !pip install basilisp-kernel, appears in the list of runtime types, and even starts up without any errors. However, the code cells still accept and execute Python code, which is really bizarre.

I checked the code, and from what I understand, the backend executes Basilisp by running it within a Python interpreter using the Basilisp compiler and runtime libraries. If that's the case, could this be the reason why the issue is happening?

@ikappaki
Copy link
Owner

ikappaki commented Mar 5, 2025

Hi @qubit55,

it took me a while to figure this out.

I think Google Colab does not officially support switching to kernels other than those it provides.

However, you can install the Basilisp kernel and switch to it via File > Change runtime type > Runtime type > Basilisp as you suggested.

Before doings so though, you must disable Colab's control over the Basilisp kernel by renaming or removing the IPython config file which overtakes it:

%%sh
pip install basilisp_kernel
mv /etc/ipython/ipython_config.py /etc/ipython/ipython_config.py.dis

After switching the runtime, referesh the page.

You should now be able to run Basilisp code in Collab cells:

Image

I hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants