# Value of @\_\_DIR\_\_ in Pluto notebook on Binder

**URL:** <https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179>\
**Category:** General Usage\
**Tags:** pluto\
**Created:** [September 14, 2021, 11:28pm UTC](https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179 "2021-09-14T23:28:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Nahabedian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark_nahabedian/32/16562_2.png) [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Post date:** [September 14, 2021, 11:28pm UTC](https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179/1 "2021-09-14T23:28:21Z")

</div>

I have a Pluto notebook checked into GitHub that I’d like to be able to access through Binder.

My notebook uses @ **DIR** to activate a workspace (also in GitHub) that identifies the packages needed by the notebook.

This works fine on my local clone, but from Binder, @ **DIR** refers to some binder directory, rather than to the workspace directory on GitHub where the notebook lives.

What should I be doing to make this work? I’m trying to avoid waiting for the package manager to compute the transitive closure of the package dependencies when my notebook is opened.

My workspace and notebook are here:  
[https://github.com/MarkNahabedian/DesignWithSVG/tree/master/floor\_drain](https://github.com/MarkNahabedian/DesignWithSVG/tree/master/floor_drain)

Thanks.

---

<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:** [September 15, 2021, 4:38am UTC](https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179/2 "2021-09-15T04:38:49Z")

</div>

Isn’t this solved by Pluto’s built in package manager? As the manifest is part of the notebook file itself you shouldn’t have to rely on other files in some directory?

---

<div class="post-metadata">

**Author:** ![Mark\_Nahabedian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark_nahabedian/32/16562_2.png) [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Post date:** [September 15, 2021, 1:43pm UTC](https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179/3 "2021-09-15T13:43:42Z")

</div>

I don’t know. I’ve done a Pkg.update(“Pluto”) maybe half a dozen times in the past few days and Pluto still complains that it is running an older version. I’ll try again, paying close attention to Pluto’s startup output which zips by.

In any case, I have a much larger notebook that I’m gradually migrating code out of and into a package. I’ll want that notebook and package to both use the same workspace so I’d like for @ **DIR** or something like it to work for GitHub URIs.

Isn’t this solved by Pluto’s built in package manager? As the manifest is part of the notebook file itself you shouldn’t have to rely on other files in some directory?

---

<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:** [September 15, 2021, 1:57pm UTC](https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179/4 "2021-09-15T13:57:12Z")

</div>

Have you done the update from the REPL before starting Pluto or withing Pluto? Have a look at my answer [here](https://stackoverflow.com/questions/68594596/pluto-for-julia-keeps-wanting-to-update-when-i-already-did-is-this-a-bug/68600785#68600785) on a similar issue.

If you’re in the REPL, just do `add Pluto@0.16` to force an upgrade and/or get more information about what in your environment is preventing an update.

---

<div class="post-metadata">

**Author:** ![Mark\_Nahabedian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark_nahabedian/32/16562_2.png) [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Post date:** [September 15, 2021, 3:43pm UTC](https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179/5 "2021-09-15T15:43:03Z")

</div>

Thanks for that suggestion.

```julia
Pkg.add(PackageSpec(name="Pluto", version="0.16"))

```

(because ]commands don’t play nice with emacs shell mode) showed me that PlutoTool (a package of mine) was constraining the Pluto version. I fixed that and updated Pluto. Now it starts without a version warning.

---

<div class="post-metadata">

**Author:** ![Mark\_Nahabedian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark_nahabedian/32/16562_2.png) [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Post date:** [September 15, 2021, 4:20pm UTC](https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179/6 "2021-09-15T16:20:15Z")

</div>

I’ve done a bit of stubling around with my binder link.

If I open

> **[GitHub: fonsp/pluto-on-binder/v0.16](https://mybinder.org/v2/gh/fonsp/pluto-on-binder/v0.16?urlpath=pluto%2Fopen?url=https%253A%252F%252Fraw.githubusercontent.com%252FMarkNahabedian%252FDesignWithSVG%252Fmaster%252Ffloor_drain%252Ffloor_drain.jl)**
>
> Click to run this interactive environment. From the Binder Project: Reproducible, sharable, interactive computing environments.

and evaluate @ **FILE** and @ **DIR** in the resulting notebook, I get references to `/srv/julia/pkg/pluto_notebooks` rather than to my github repository.

---

<div class="post-metadata">

**Author:** ![Mark\_Nahabedian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark_nahabedian/32/16562_2.png) [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Post date:** [September 16, 2021, 3:45am UTC](https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179/7 "2021-09-16T03:45:10Z")

</div>

I’m trying Pluto’s package manager instead of using my own workspace. I use a couple of unregistered packages so I `Pkg.add` those.

My notebook is at

> <https://github.com/MarkNahabedian/DesignWithSVG/blob/master/floor_drain/floor_drain.jl>

The binder link I’m using is

> **[GitHub: fonsp/pluto-on-binder/v0.16.0](https://mybinder.org/v2/gh/fonsp/pluto-on-binder/v0.16.0?urlpath=pluto%2Fopen?url=https%253A%252F%252Fraw.githubusercontent.com%252FMarkNahabedian%252FDesignWithSVG%252Fmaster%252Ffloor_drain%252Ffloor_drain.jl)**
>
> Click to run this interactive environment. From the Binder Project: Reproducible, sharable, interactive computing environments.

In binder, my notebook gets the error

```julia
ArgumentError: Package Unitful not found in current path:

- Run `import Pkg; Pkg.add("Unitful")` to install the Unitful package.

```

but Unitful is in the general package registry here

```julia
https://github.com/JuliaRegistries/General/tree/master/U/Unitful

```

Shouldn’t the Pluto package manager be finding it there?

---

<div class="post-metadata">

**Author:** ![Mark\_Nahabedian](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mark_nahabedian/32/16562_2.png) [@Mark\_Nahabedian](https://discourse.julialang.org/u/Mark_Nahabedian)\
**Post date:** [September 18, 2021, 12:02am UTC](https://discourse.julialang.org/t/value-of-dir-in-pluto-notebook-on-binder/68179/8 "2021-09-18T00:02:02Z")

</div>

Summary:

Pluto’s internal package manager can only find registered packages.

I’ve not found a way to get a Pluto notebook running on [binder.plutojl.org](http://binder.plutojl.org) to use a workspace that’s checked in to GitHub.

Explicit Pkg.add and using seem to be the only way to run my notebook on binder.
