# Unable to use @bind from PlutoUI on Colab

**URL:** <https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590>\
**Category:** Jupyter-Notebook\
**Tags:** question\
**Created:** [November 21, 2022, 2:47pm UTC](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590 "2022-11-21T14:47:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahrukh](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mahrukh](https://discourse.julialang.org/u/Mahrukh)\
**Post date:** [November 21, 2022, 2:47pm UTC](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590/1 "2022-11-21T14:47:30Z")

</div>

Hi everyone! I’m trying to run the Julia code from [https://github.com/mitmath/18S191/blob/Fall20/lecture\_notebooks/week1/01-images-intro.jl](https://github.com/mitmath/18S191/blob/Fall20/lecture_notebooks/week1/01-images-intro.jl) on Colab as I can’t run it on my local machine. Pretty much all cells get executed except the one where Grant utilizes the PlutoUI’s `@bind` ([https://youtu.be/DGojI9xcCfg?t=996](https://youtu.be/DGojI9xcCfg?t=996)) and i get this error as visible in screenshot. Please can anyone help resolving this issue?

```julia
begin 
  Pkg.add(["PlutoUI", "MLJBase"])
  using PlutoUI
  using MLJBase
end

@bind repeat_count Slider(1:10, show_value = true)

```

 ![Screenshot 2022-11-21 112410](https://global.discourse-cdn.com/julialang/original/3X/2/1/21495c01da8d2fb4e1fe48dfb6a287a6dc5955f2.png)

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [November 21, 2022, 2:57pm UTC](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590/2 "2022-11-21T14:57:30Z")

</div>

That stacktrace look suspiciously like an IJulia/Jupyter notebook, are you sure you are running a Pluto notebook?

This simple example works for me without issues:

 ![image](https://global.discourse-cdn.com/julialang/original/3X/c/f/cf23028dd7ba0a6b1ff2d55c3b096f3150e1a3fa.png)

---

<div class="post-metadata">

**Author:** ![Mahrukh](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mahrukh](https://discourse.julialang.org/u/Mahrukh)\
**Post date:** [November 21, 2022, 3:20pm UTC](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590/3 "2022-11-21T15:20:55Z")

</div>

I’m using the following code block from [DataCampPresentation.jl/datacamp-answers.ipynb at main · jverzani/DataCampPresentation.jl · GitHub](https://github.com/jverzani/DataCampPresentation.jl/blob/main/datacamp-answers.ipynb) to set up Julia in Google Colab.

```julia
# Installation cell
%%capture
%%shell
if ! command -v julia 3>&1 > /dev/null
then
    wget -q 'https://julialang-s3.julialang.org/bin/linux/x64/1.8/julia-1.8.2-linux-x86_64.tar.gz' \
        -O /tmp/julia.tar.gz
    tar -x -f /tmp/julia.tar.gz -C /usr/local --strip-components 1
    rm /tmp/julia.tar.gz
fi
julia -e 'using Pkg; pkg"add IJulia PlotlyLight DataFrames CSV Chain FreqTables CategoricalArrays; precompile;"'
echo 'Done'

```

Not running Pluto notebook as it only works locally and i can’t run these image manipulations on local machine due to device constraints. So, i’m just following the Computational Thinking course video and notebook from GitHub and coding on Colab.

---

<div class="post-metadata">

**Author:** ![sashmit](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sashmit/32/18791_2.png) [@sashmit](https://discourse.julialang.org/u/sashmit)\
**Post date:** [November 21, 2022, 3:39pm UTC](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590/4 "2022-11-21T15:39:02Z")

</div>

try binder instead of colab

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [November 21, 2022, 3:47pm UTC](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590/5 "2022-11-21T15:47:02Z")

</div>

Well if you’re not running a Pluto notebook then you shouldn’t expect `PlutoUI` to work. If you want interactivity in a Jupyter notebook look at

> **[GitHub - JuliaGizmos/Interact.jl: Interactive widgets to play with your Julia...](https://github.com/JuliaGizmos/Interact.jl)**
>
> Interactive widgets to play with your Julia code. Contribute to JuliaGizmos/Interact.jl development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![j\_verzani](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_verzani/32/8551_2.png) [@j\_verzani](https://discourse.julialang.org/u/j_verzani)\
**Post date:** [November 21, 2022, 5:01pm UTC](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590/6 "2022-11-21T17:01:14Z")

</div>

I might have made that recommendation, but colab works pretty well

---

<div class="post-metadata">

**Author:** ![Mahrukh](https://avatars.discourse-cdn.com/v4/letter/m/e47774/32.png) [@Mahrukh](https://discourse.julialang.org/u/Mahrukh)\
**Post date:** [November 22, 2022, 4:07am UTC](https://discourse.julialang.org/t/unable-to-use-bind-from-plutoui-on-colab/90590/7 "2022-11-22T04:07:15Z")

</div>

Thanks for the solution!
