# Julia in Colab

**URL:** <https://discourse.julialang.org/t/julia-in-colab/126600>\
**Category:** General Usage\
**Tags:** colab\
**Created:** [March 5, 2025, 10:55pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600 "2025-03-05T22:55:11Z")\
**Posts on this page:** 18\
**Page:** 3

<div class="post-metadata">

**Author:** ![Mason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mason/32/2423_2.png) [@Mason](https://discourse.julialang.org/u/Mason)\
**Post date:** [March 11, 2025, 1:04pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/44 "2025-03-11T13:04:23Z")

</div>

That still wouldn’t fix the bigger problem Valentin raised which is

> [@vchuravy](#):
>
> I noticed that precompilation times are quite bad, the machines seem to be beefy enough so I wonder if the slow down is some unfortunate interaction with the file system?
> 
> Ideally one would be able to have a transparent cache for JULIA\_DEPOT\_PATH. (`~/.julia`) (That’s something we do on GitHub actions), and support for Project.toml?

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [March 11, 2025, 1:18pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/45 "2025-03-11T13:18:22Z")

</div>

I assumed some sort of depot did exist, but I didn’t check myself

---

<div class="post-metadata">

**Author:** ![MilesCranmer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milescranmer/32/21070_2.png) [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Post date:** [March 11, 2025, 2:42pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/46 "2025-03-11T14:42:52Z")

</div>

> [@vchuravy](#):
>
> We can disagree on `1` and be of different opinion and that is fine, but the crux for me is `2.` because that leads to the question:

Sounds right to me. Indeed it would be fantastic if Colab packaged a precompilation cache, regardless of what packages sit in the base environment.

However one worry I have here is cache invalidation from new packages—note that Colab does not update the packages that frequently IIRC. I think artifacts would be tricky also, in case the new packages require new artifacts. I think a larger base env (with frozen versions), while it isn’t perfect, does mean you can get a start working quicker. Similar to Python—it can take a while to install PyTorch, so I don’t mind that Colab freezes the version at a slightly older value.

---

<div class="post-metadata">

**Author:** ![NonDairyNeutrino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nondairyneutrino/32/221496_2.png) [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Post date:** [March 11, 2025, 5:10pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/47 "2025-03-11T17:10:59Z")

</div>

Oops! My brain said “I’m using the `+(::CuArray, ::CuArray)`; I’m good to go.”, but timing just the kernel launch strikes again! I thought it was weird that the GPU line was flat lol; I chocked it up to the GPU might not be saturating even at those longer arrays (which it probably definitely should at 10^8 elements). Thanks for catching that!

I have edited my original post to disclose this and linked to your post!

---

<div class="post-metadata">

**Author:** ![asinghvi17](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/asinghvi17/32/8272_2.png) [@asinghvi17](https://discourse.julialang.org/u/asinghvi17)\
**Post date:** [March 11, 2025, 8:01pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/48 "2025-03-11T20:01:07Z")

</div>

I believe you can have Javascript run by `display(MIME("application/javascript"), yourjs_string)`, so that can be a “listener” to a message…I was experimenting with this a bit for WGLMakie support but probably wasn’t using the IJulia interface correctly.

---

<div class="post-metadata">

**Author:** ![blegat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/blegat/32/217090_2.png) [@blegat](https://discourse.julialang.org/u/blegat)\
**Post date:** [March 20, 2025, 9:10am UTC](https://discourse.julialang.org/t/julia-in-colab/126600/49 "2025-03-20T09:10:06Z")

</div>

There is an issue opened : [Support Pluto notebooks for Julia · Issue #5167 · googlecolab/colabtools · GitHub](https://github.com/googlecolab/colabtools/issues/5167)

---

<div class="post-metadata">

**Author:** ![metrizable](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/metrizable/32/215391_2.png) [@metrizable](https://discourse.julialang.org/u/metrizable)\
**Post date:** [March 21, 2025, 2:50pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/50 "2025-03-21T14:50:06Z")

</div>

> Any plans to support the latest stable version of Julia ? (Currently 1.11.3).

On the roadmap, but a little ways out.

We did just upgrade to 1.10.9 following its release a couple days ago. We also pre-install CUDA.jl now (configured to use system-installed CUDA), to save some time.

---

<div class="post-metadata">

**Author:** ![metrizable](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/metrizable/32/215391_2.png) [@metrizable](https://discourse.julialang.org/u/metrizable)\
**Post date:** [March 21, 2025, 2:55pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/51 "2025-03-21T14:55:59Z")

</div>

> [@vchuravy](#):
>
> Ideally one would be able to have a transparent cache for JULIA\_DEPOT\_PATH. (`~/.julia`) (That’s something we do on GitHub actions), and support for Project.toml?

This is an interesting idea. It’s slightly different than our current experience as @MilesCranmer mentioned, so not sure where it will land, but one we’re thinking on.

---

<div class="post-metadata">

**Author:** ![metrizable](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/metrizable/32/215391_2.png) [@metrizable](https://discourse.julialang.org/u/metrizable)\
**Post date:** [March 21, 2025, 2:59pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/52 "2025-03-21T14:59:10Z")

</div>

> [@vchuravy](#):
>
> I noticed that precompilation times are quite bad, the machines seem to be beefy enough so I wonder if the slow down is some unfortunate interaction with the file system?

This seems a bit concerning to me and probably worth [filing an issue](https://github.com/googlecolab/colabtools/issues/new?template=bug_report.md) with a minimal repro.

---

<div class="post-metadata">

**Author:** ![Victorio\_Costa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/victorio_costa/32/216123_2.png) [@Victorio\_Costa](https://discourse.julialang.org/u/Victorio_Costa)\
**Post date:** [April 2, 2025, 3:18pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/53 "2025-04-02T15:18:23Z")

</div>

This worked for me! Thank you very much for the “hacky”.

---

<div class="post-metadata">

**Author:** ![vtamsitt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vtamsitt/32/216215_2.png) [@vtamsitt](https://discourse.julialang.org/u/vtamsitt)\
**Post date:** [April 8, 2025, 3:54pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/54 "2025-04-08T15:54:18Z")

</div>

> [@metrizable](#):
>
> It would also be cool to build up native Julia tooling to replicate functionality found in the google.colab Python package

Would really love to see this, especially a smooth UX for mount Google Drive!

---

<div class="post-metadata">

**Author:** ![arrowmancer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arrowmancer/32/209575_2.png) [@arrowmancer](https://discourse.julialang.org/u/arrowmancer)\
**Post date:** [May 26, 2025, 7:20pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/55 "2025-05-26T19:20:04Z")

</div>

Hi guys, I don’t think I’m able to get Reactant to find any Nvidia GPUs when I select a GPU runtime on Colab. E.g. when I select A100 or the L4 GPU, and then try to run:

Reactant.set\_default\_backend(“gpu”)

I get the following error:

```julia
No GPU client foundStacktrace: [1] error(s::String) @ Base ./error.jl:35 
[2] client(backend::String) @ Reactant.XLA ~/.julia/packages/Reactant/cTiTU/src/xla/XLA.jl:82 
[3] set_default_backend @ ~/.julia/packages/Reactant/cTiTU/src/xla/XLA.jl:104 [inlined] 
[4] set_default_backend(backend::String) @ Reactant ~/.julia/packages/Reactant/cTiTU/src/Reactant.jl:293 
[5] top-level scope @ In[15]:1 

```

---

<div class="post-metadata">

**Author:** ![NonDairyNeutrino](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nondairyneutrino/32/221496_2.png) [@NonDairyNeutrino](https://discourse.julialang.org/u/NonDairyNeutrino)\
**Post date:** [May 26, 2025, 7:40pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/56 "2025-05-26T19:40:04Z")

</div>

This thread has been about the inclusion of Julia as a backend for colab. Because your question is about _using_ Julia in colab, I think it would be more appropriate as its own topic under the `colab` tag.

---

<div class="post-metadata">

**Author:** ![mofeing](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mofeing/32/47619_2.png) [@mofeing](https://discourse.julialang.org/u/mofeing)\
**Post date:** [May 26, 2025, 8:02pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/57 "2025-05-26T20:02:11Z")

</div>

Would you mind opening an issue in Reactant.jl?

---

<div class="post-metadata">

**Author:** ![arrowmancer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/arrowmancer/32/209575_2.png) [@arrowmancer](https://discourse.julialang.org/u/arrowmancer)\
**Post date:** [May 26, 2025, 8:45pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/58 "2025-05-26T20:45:55Z")

</div>

Sure thing!

---

<div class="post-metadata">

**Author:** ![evelyne-ringoot](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/evelyne-ringoot/32/45001_2.png) [@evelyne-ringoot](https://discourse.julialang.org/u/evelyne-ringoot)\
**Post date:** [September 19, 2025, 2:51am UTC](https://discourse.julialang.org/t/julia-in-colab/126600/59 "2025-09-19T02:51:46Z")

</div>

Thanks so much for setting up the julia colab, this is great! Similarly struggling with very slow precompilation times for custom set-ups, I opened an issue with some MWE: [Julia pkg loading and compilation slow · Issue #5608 · googlecolab/colabtools · GitHub](https://github.com/googlecolab/colabtools/issues/5608)

---

<div class="post-metadata">

**Author:** ![Donatus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/donatus/32/219312_2.png) [@Donatus](https://discourse.julialang.org/u/Donatus)\
**Post date:** [November 7, 2025, 2:20pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/60 "2025-11-07T14:20:42Z")

</div>

## 🐞 Julia on Colab: LaTeX Output Rendering Issue

Hello,

I’ve noticed an issue when running **Julia code inside a Google Colab notebook** (using the Julia kernel).

The problem is that output intended to be displayed in **LaTeX format is not being rendered** (formatted mathematically). Instead of seeing the typeset mathematical notation, the output is displayed as the raw LaTeX string.

This affects standard output mechanisms in Julia that should automatically render to LaTeX/MathML in an interactive environment.

**Expected Behavior:**  
When outputting a LaTeX string (e.g., using a package or just a display function), the output should be rendered as a properly typeset equation.

**Observed Behavior:**  
The output appears as the plain, unrendered LaTeX source code string.

Could this be an issue with how the Julia kernel in the Colab environment handles the display protocol for `text/latex` MIME types?

Thank you for looking into this!

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [January 29, 2026, 2:22pm UTC](https://discourse.julialang.org/t/julia-in-colab/126600/61 "2026-01-29T14:22:58Z")

</div>

Hello, as of 2026 is there a way now to have local environments in Colab?

(I join those that prefer to have an empty global environment and put everything in local environments - then, to populate them, in Julia is as easy as `using Pkg; Pkg.activate(@ __DIR__ ); Pkg.instantiate()`.)

EDIT: Feature request: [Allow the creation of local permanent environments in Julia kernel notebooks · Issue #5808 · googlecolab/colabtools · GitHub](https://github.com/googlecolab/colabtools/issues/5808)

[Previous page](https://discourse.julialang.org/t/julia-in-colab/126600.md?page=2)
