# ANN: mybinder.org support for Julia 1.x and Project.toml

**URL:** <https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522>\
**Category:** Community\
**Tags:** announcement, binder\
**Created:** [March 30, 2019, 1:15am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522 "2019-03-30T01:15:31Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Peter\_Kourzanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/peter_kourzanov/32/10455_2.png) [@Peter\_Kourzanov](https://discourse.julialang.org/u/Peter_Kourzanov)\
**Post date:** [January 14, 2020, 1:45pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/21 "2020-01-14T13:45:36Z")

</div>

I notice mybinder moved on to Julia 1.3.1. However, some packages fail there. Is it possible to pin the Julia version in the ipynb file (or Project.toml)? It seems that both [compat]julia=“1.1” and “kernelspec” (in ipynb) are being ignored…

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [January 14, 2020, 5:23pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/22 "2020-01-14T17:23:41Z")

</div>

Try `julia = "=1.0.2"` in the compat section, that should pin it to that version. `julia = "1.1"` means “the newest version that is compatible with 1.1 according to semver”. It really is just a lower bound on all 1.x.y versions.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 15, 2020, 9:08am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/23 "2020-01-15T09:08:00Z")

</div>

The [tilde specifier](https://julialang.github.io/Pkg.jl/dev/compatibility/#Tilde-specifiers-1)

```nohighlight
julia = "~1.0"

```

is also an option to get `[1.0.0, 1.1.0)`.

---

<div class="post-metadata">

**Author:** ![Peter\_Kourzanov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/peter_kourzanov/32/10455_2.png) [@Peter\_Kourzanov](https://discourse.julialang.org/u/Peter_Kourzanov)\
**Post date:** [January 15, 2020, 9:46am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/24 "2020-01-15T09:46:10Z")

</div>

Great, seems to work now:-) Thank you very much for pointers!

---

<div class="post-metadata">

**Author:** ![elizavetasemenova](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elizavetasemenova/32/8394_2.png) [@elizavetasemenova](https://discourse.julialang.org/u/elizavetasemenova)\
**Post date:** [February 27, 2020, 4:19pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/25 "2020-02-27T16:19:03Z")

</div>

Great to hear that Binder can be used for Julia! Two questions:

1. I am using the Project.toml file found here: [demo-julia/Project.toml at main · binder-examples/demo-julia · GitHub](https://github.com/binder-examples/demo-julia/blob/master/Project.toml)

Do the strings to the right from “=” specify package versions? Where can these strings be found, i.e. if I need to add the Turing v0.6.23 package, how should the Project.toml be edited?

1. I need Julia 1.0.4 and here is my Project.toml file: [BNN\_tox/Project.toml at master · elizavetasemenova/BNN\_tox · GitHub](https://github.com/elizavetasemenova/binder_julia/blob/master/Project.toml)  
However, when I launch the image, the version is 1.3.1

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [February 27, 2020, 6:04pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/26 "2020-02-27T18:04:20Z")

</div>

I think most of your questions can be answered by [3. Managing Packages · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/managing-packages/), [4. Working with Environment · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/environments/) and [6. Compatibility · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/compatibility/).

> [@elizavetasemenova](#):
>
> Do the strings to the right from “=” specify package versions?

No, its just a unique identifier, UUID, that each package has, so it is not a version, just an “extension” of the name.

> [@elizavetasemenova](#):
>
> if I need to add the Turing v0.6.23 package, how should the Project.toml be edited?

You would use the package manager to `pkg> add Turing@0.6.23` and then also maybe add a `[compat]` entry. I believe that binder will use the `Manifest.toml` file, so consider committing that.

> [@elizavetasemenova](#):
>
> I need Julia 1.0.4 and here is my Project.toml file: [https://github.com/elizavetasemenova/binder\_julia/blob/master/Project.toml](https://github.com/elizavetasemenova/binder_julia/blob/master/Project.toml)  
> However, when I launch the image, the version is 1.3.1

Yes, see the section about Compatibility I linked above: `julia = "1.0.4"` means `[1.0.4, 2.0)`. See the docs for other alternatives.

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [February 27, 2020, 6:23pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/27 "2020-02-27T18:23:19Z")

</div>

> [@fredrikekre](#):
>
> Yes, see the section about Compatibility I linked above: `julia = "1.0.4"` means `[1.0.4, 2.0)` . See the docs for other alternatives.

Just to add, to chose specifically 1.0.4, the syntax is `julia = "=1.0.4"` (note the double equals).

---

<div class="post-metadata">

**Author:** ![elizavetasemenova](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elizavetasemenova/32/8394_2.png) [@elizavetasemenova](https://discourse.julialang.org/u/elizavetasemenova)\
**Post date:** [February 27, 2020, 7:08pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/28 "2020-02-27T19:08:55Z")

</div>

thanks for your answers! The picture is clearer now, but I still don’t understand a couple of things: my goal is to create an image with Julia 1.0.4 (or whatever version can do the right version of Turing) and Turing 0.6.23 to be able to share the environment for a publication. My current understanding is that if I manage to collect correctly `Manifest.toml` and `Project.toml` files, Binder will be launching exactly what I need and the users won’t need to make any additional installations. The questions now are:

- where does the `Manifest.toml` file come from? I have found a couple on my computer, but none of them contains the Turing record, even though I use Truing all the time.
- do the UUID come into `Project.toml` from the `Manifest.toml` file, i.e. should I copy-paste them from there for the libraries which I am going to use?
- where and when should I use the package manager on Binder? I thought the idea of Binder was to pre-define all package versions in `Project.toml` and let everyone use the given set up. Please correct me if I am wrong.

---

<div class="post-metadata">

**Author:** ![elizavetasemenova](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elizavetasemenova/32/8394_2.png) [@elizavetasemenova](https://discourse.julialang.org/u/elizavetasemenova)\
**Post date:** [February 27, 2020, 7:40pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/29 "2020-02-27T19:40:53Z")

</div>

thanks, with this correction I got version 1.0.4 to work!

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 27, 2020, 9:13pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/30 "2020-02-27T21:13:03Z")

</div>

> [@elizavetasemenova](#):
>
> - where does the `Manifest.toml` file come from? I have found a couple on my computer, but none of them contains the Turing record, even though I use Truing all the time.
> - do the UUID come into `Project.toml` from the `Manifest.toml` file, i.e. should I copy-paste them from there for the libraries which I am going to use?
> - where and when should I use the package manager on Binder? I thought the idea of Binder was to pre-define all package versions in `Project.toml` and let everyone use the given set up. Please correct me if I am wrong.

The Project.toml and Manifest.toml files, forming an environment, are automatically generated when you `] add` packages. By default, Julia is using a global environment named after the Julia version you are using, e.g. `v1.3`, which lies in `~/.julia/environments/v1.3`. To change the environment, you can start Julia with `julia --project=.` or, alternatively, use `] activate .` inside the REPL. The dot here simply means the current directory (it could be any path). If you then `] add` a package you will see that the local Project.toml and Manifest.toml in your current directory will change (or be created if they didn’t exist before). There will automatically be the correct UUID. No need to copy past it.

Therefore, to make your publication project self-contained, you should navigate to its root directory, start julia with `julia --project=.` and add all the relevant packages. Note that you can use `] add Turing@0.6.23` to add a specific version of Turing. Why was Turing working before? Because it is present in the global environment, which is, well, global and can always be accessed. Make sure that you check which other packages from the global environment you were using and add their respective versions to your local environment.

Afterwards, push your project with the toml files to GitHub. Binder will now “just work”. When creating a docker container, it automatically sees the toml files and installs all the dependencies (it calls `] instantiate` for this). No need for “using the package manager on Binder”.

I hope this helps. Let me know if something is still unclear.

PS: See an example here: [GitHub - carstenbauer/JuliaOulu20: Julia Workshop @ University of Oulu, Finnland](https://github.com/crstnbr/JuliaOulu20)

---

<div class="post-metadata">

**Author:** ![elizavetasemenova](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elizavetasemenova/32/8394_2.png) [@elizavetasemenova](https://discourse.julialang.org/u/elizavetasemenova)\
**Post date:** [February 28, 2020, 10:01am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/31 "2020-02-28T10:01:37Z")

</div>

Thank you Carsten! Following your hint, I found the folder `~/.julia/environments/v1.0` and the `Manifest.toml` and `Project.toml` files in it - Binder works well with those two and does exactly what I want.

---

<div class="post-metadata">

**Author:** ![Xing\_Shi\_Cai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xing_shi_cai/32/14128_2.png) [@Xing\_Shi\_Cai](https://discourse.julialang.org/u/Xing_Shi_Cai)\
**Post date:** [April 16, 2020, 10:24pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/32 "2020-04-16T22:24:02Z")

</div>

Is there any way to put `Manifest.toml` and `Project.toml` in a sub-directory? My notebooks are not put at the root of my repo. So if I do `Pkg.active(".")` in a notebook, the `.toml` files are create where to notebooks are.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [April 17, 2020, 7:25am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/33 "2020-04-17T07:25:50Z")

</div>

No, [mybinder.org](http://mybinder.org) will only process a project in the root. But, notebooks in sub folders automatically activate such projects, I.e. you should not need the manual activate call in your notebook at all.

---

<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:** [June 8, 2020, 8:32am UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/34 "2020-06-08T08:32:56Z")

</div>

How to use myBinder [with a package that allows multiple Julia versions in `[compat]`](https://github.com/sylvaticus/Bmlt.jl), e.g. `julia = "1.3,1.4,1.5"` ?

I am now getting [the following error in myBinder](https://mybinder.org/v2/gh/sylvaticus/Bmlt.jl/master):

```julia
Error during build: invalid literal for int() with base 10: '1,1'

```

EDIT: This has been addressed in the jupyter discourse forum and resulted in a new issue being created on their repository: [[Julia] myBinder build error ("invalid literal for int() with base 10") - #3 by sylvaticus - Binder - Jupyter Community Forum](https://discourse.jupyter.org/t/julia-mybinder-build-error-invalid-literal-for-int-with-base-10/4755/3)

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [June 8, 2020, 1:40pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/35 "2020-06-08T13:40:28Z")

</div>

I tried out Binder yesterday. Things seemed to work but when I evaluated the first cell it did `using Queryverse` which tried to precompile and failed due to some missing xlsx related stuff. It appears that the excel reading components rely on some python libraries that have to be separately installed? Is it possible to make that be installed in the docker image? What is required?

Yes I could do `using ...` For just the packages i actually need but I’m writing tutorials and I think the audience wants the simplicity of grabbing all of queryverse.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [June 8, 2020, 6:40pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/36 "2020-06-08T18:40:21Z")

</div>

You probably need to add a requirements.txt (I think that is the Python way of doing this) that adds the `xlrd` library.

Although, I’m slightly confused now, I thought we had setup the binder story so that PyCall.jl would use a private conda Python installation, in which case `xlrd` should be auto-installed for you…

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [June 8, 2020, 6:41pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/37 "2020-06-08T18:41:59Z")

</div>

Well it didn’t work by automatic anything, but adding requirements.txt with

```julia
xlrd==1.1.*

```

did the trick

EDIT: However, it takes something like 15-30 minutes to build this binder… and it seems to rebuild most times I go to the link… I thought it was cached after the first build…

Yep, every time I go to my url I get a new build, it takes what seems like a half hour to start. Totally unusable.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [June 8, 2020, 8:57pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/38 "2020-06-08T20:57:34Z")

</div>

Are you making any update to the github repo? That will trigger a rebuild. Otherwise that sounds like a bug on the mybinder side of things to me.

---

<div class="post-metadata">

**Author:** ![dlakelan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dlakelan/32/8491_2.png) [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Post date:** [June 8, 2020, 8:59pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/39 "2020-06-08T20:59:12Z")

</div>

nope, repo has been static for several hours, but still every time I try to open it, it’s rebuilding.

> **[GitHub: dlakelan/JuliaDataTutorials/master](https://mybinder.org/v2/gh/dlakelan/JuliaDataTutorials/master)**
>
> Click to run this interactive environment. From the Binder Project: Reproducible, sharable, interactive computing environments.

Right now it’s only really got one ipynb which is something that does graphs of the [covidtracking.org](http://covidtracking.org) data across all the states, so my friends can just go and get the latest graphs and not ask me to manually update some other ones I was making in PDF form 😉

There are some other notebooks for tutorials but I haven’t pushed the actual ipynb yet because I need some debugging etc. For example, it seems like Gadfly causes conflicts with recent Queryverse and with Turing… so I haven’t figured that out yet.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [June 8, 2020, 9:23pm UTC](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522/40 "2020-06-08T21:23:27Z")

</div>

It actually opened literally instantaneously for me just now 🙂 I think whatever is going on there, it is a binder thing, not related to the Julia side of things.

[Previous page](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522.md?page=1)

[Next page](https://discourse.julialang.org/t/ann-mybinder-org-support-for-julia-1-x-and-project-toml/22522.md?page=3)
