# Viewing the Notebooks Locally

**URL:** <https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574>\
**Category:** General Usage\
**Tags:** package, diffeq\
**Created:** [October 20, 2018, 4:55pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574 "2018-10-20T16:55:34Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [October 20, 2018, 4:55pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/1 "2018-10-20T16:55:34Z")

</div>

To view the notebooks locally and interact with the contents, use the following commands (requires [IJulia](https://github.com/JuliaLang/IJulia.jl)):

[given in the following link](https://github.com/JuliaDiffEq/DiffEqTutorials.jl)

Pkg.clone(“[GitHub - SciML/SciMLTutorials.jl: Tutorials for doing scientific machine learning (SciML) and high-performance differential equation solving with open source software.](https://github.com/JuliaDiffEq/DiffEqTutorials.jl)”)  
using IJulia  
notebook(dir=Pkg.dir(“DiffEqTutorials”))

But I get the following alerts:

 ![Error_IJulia](https://global.discourse-cdn.com/julialang/original/3X/e/7/e7f06614397daa367ef29336b50eece0795c1243.jpeg)

Need your guidance. And help

Hermes

---

<div class="post-metadata">

**Author:** ![cormullion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cormullion/32/49131_2.png) [@cormullion](https://discourse.julialang.org/u/cormullion)\
**Post date:** [October 20, 2018, 5:14pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/2 "2018-10-20T17:14:34Z")

</div>

Looks like it’s been reported already: ["IJulia Notebook Tutorials" instructions outdated · Issue #31 · SciML/SciMLTutorials.jl · GitHub](https://github.com/JuliaDiffEq/DiffEqTutorials.jl/issues/31)

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 20, 2018, 6:01pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/3 "2018-10-20T18:01:04Z")

</div>

This has now been updated with a v1.0-friendly way of doing it:

```julia
using Pkg
#Pkg.add("IJulia") # Need to do this the first time to install IJulia!
pkg"add https://github.com/JuliaDiffEq/DiffEqTutorials.jl"
using IJulia, DiffEqTutorials
notebook(dir = joinpath(dirname(pathof(DiffEqTutorials)),".."))

```

@StefanKarpinski, can you chime in on whether there’s a better way of doing this kind of thing with v1.0? Essentially it’s a project that I want to share and have people edit (since it’s a notebook to play with). On v0.6 it would dirty repos, is v1.0 safe for this since they aren’t working in a repo if it’s add?

---

<div class="post-metadata">

**Author:** ![tkf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkf/32/17635_2.png) [@tkf](https://discourse.julialang.org/u/tkf)\
**Post date:** [October 20, 2018, 7:14pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/4 "2018-10-20T19:14:10Z")

</div>

Doesn’t it create a new directory `~/.julia/packages/DiffEqTutorials/xxxxxx` every time DiffEqTutorials is updated (and `]up` is run)? Not sure if that’s desired or not though.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 20, 2018, 9:13pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/5 "2018-10-20T21:13:22Z")

</div>

> [@tkf](#):
>
> Doesn’t it create a new directory `~/.julia/packages/DiffEqTutorials/xxxxxx` every time DiffEqTutorials is updated (and `]up` is run)? Not sure if that’s desired or not though.

Yeah it does. But it’s at least safe? I’m not sure if there’s a more standard Pkg3 way to handle this.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 20, 2018, 10:02pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/6 "2018-10-20T22:02:05Z")

</div>

FWIW, after [https://github.com/JuliaLang/Pkg.jl/pull/785](https://github.com/JuliaLang/Pkg.jl/pull/785), files in packages are read-only when `add`ed.

---

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [October 25, 2018, 6:19pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/7 "2018-10-25T18:19:20Z")

</div>

When I run the updated commands:  
I receive the following alert:

> Blockquote  
> using Pkg  
> #pkg.add(“IJulia”) # Need to do this the first time to install IJulia!  
> pkg"add [GitHub - SciML/SciMLTutorials.jl: Tutorials for doing scientific machine learning (SciML) and high-performance differential equation solving with open source software.](https://github.com/JuliaDiffEq/DiffEqTutorials.jl)"  
> using IJulia, DiffEqTutorials  
> notebook(dir = joinpath(dirname(pathof(DiffEqTutorials)),“…”))

Updating registry at `C:\Users\user\.julia\registries\General`  
Updating git-repo `https://github.com/JuliaRegistries/General.git`  
[1mFetching: [========================================\>] 99.9 %0.0 %] 13.4 %\> ] 36.4 %Fetching: [====================\>] 49.8 %======================\> ] 54.2 %] 67.5 % [=================================\>] 80.8 %6 %\>] 98.0 % Cloning git-repo `https://github.com/JuliaDiffEq/DiffEqTutorials.jl`  
[1mFetching: [==================\>] 43.6 %0.0 %

failed to clone from [GitHub - SciML/SciMLTutorials.jl: Tutorials for doing scientific machine learning (SciML) and high-performance differential equation solving with open source software.](https://github.com/JuliaDiffEq/DiffEqTutorials.jl), error: GitError(Code:ERROR, Class:OS, failed to read data: A security error occurred  
)

> Blockquote

---

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [October 25, 2018, 6:19pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/8 "2018-10-25T18:19:23Z")

</div>

When I run the updated commands

> using Pkg  
> #pkg.add(“IJulia”) # Need to do this the first time to install IJulia!  
> pkg"add [GitHub - SciML/SciMLTutorials.jl: Tutorials for doing scientific machine learning (SciML) and high-performance differential equation solving with open source software.](https://github.com/JuliaDiffEq/DiffEqTutorials.jl)"  
> using IJulia, DiffEqTutorials  
> notebook(dir = joinpath(dirname(pathof(DiffEqTutorials)),“…”))

I receive the following alert:

```julia
Updating registry at `C:\Users\user\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
[1mFetching: [========================================>] 99.9 %0.0 %] 13.4 %> ] 36.4 %Fetching: [====================>] 49.8 %======================> ] 54.2 %] 67.5 % [=================================>] 80.8 %6 %>] 98.0 % Cloning git-repo `https://github.com/JuliaDiffEq/DiffEqTutorials.jl`
[1mFetching: [==================>] 43.6 %0.0 %

failed to clone from https://github.com/JuliaDiffEq/DiffEqTutorials.jl, error: GitError(Code:ERROR, Class:OS, failed to read data: A security error occurred
)

```

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 25, 2018, 6:26pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/9 "2018-10-25T18:26:30Z")

</div>

> [@kristoffer.carlsson](#):
>
> FWIW, after [https://github.com/JuliaLang/Pkg.jl/pull/785](https://github.com/JuliaLang/Pkg.jl/pull/785), files in packages are read-only when `add` ed.

So @kristoffer.carlsson is the correct recommendation to tell users to `dev` here?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 25, 2018, 6:27pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/10 "2018-10-25T18:27:07Z")

</div>

Are you able to clone other packages? That looks like a network issue.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 25, 2018, 6:32pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/11 "2018-10-25T18:32:18Z")

</div>

Since DiffEqTutorials.jl is not a julia package (it contains no code) it seems easiest to just tag a release and tell people to download the zip / tarball. Or use `git clone`. Since it is not a package it doesn’t seem beneficial to include the package manager at all.

---

<div class="post-metadata">

**Author:** ![HerAdri](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heradri/32/5816_2.png) [@HerAdri](https://discourse.julialang.org/u/HerAdri)\
**Post date:** [October 25, 2018, 8:09pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/12 "2018-10-25T20:09:19Z")

</div>

When running the code from Atom, everything works correctly,

 ![From%20Atoma0](https://global.discourse-cdn.com/julialang/original/3X/a/f/af1c43e200a6ff45c65bc95a5cdcb2b1e37ba992.jpeg)  
And Jumper opens correctly. And everything works.  
 ![From%20Atom](https://global.discourse-cdn.com/julialang/original/3X/4/3/436bfb5f392fa156f28debe9bbee4a90759d8428.jpeg)

Not so if I run from Julia

> Using Ijulia  
> notebook ()

And in a new notebook I paste the code and run it.

 ![From%20Juliua%40Jupyter](https://global.discourse-cdn.com/julialang/original/3X/2/e/2ecfc765b4986b4bc2d644ae437a6751c8aaeb15.jpeg)

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 25, 2018, 8:15pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/13 "2018-10-25T20:15:44Z")

</div>

> [@kristoffer.carlsson](#):
>
> Since DiffEqTutorials.jl is not a julia package (it contains no code) it seems easiest to just tag a release and tell people to download the zip / tarball. Or use `git clone` . Since it is not a package it doesn’t seem beneficial to include the package manager at all.

How do you download and upzip the tarballs using a Julia package command? Let me make sure there’s not an X-Y problem here: I just want to deploy some notebooks to users with some simple 1-2 lines of Julia code that would run on any basic installation. I don’t care if it’s a package manager command or not, I was just using the package manager since I’m not sure how to download the repo’s master using Base Julia without it.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [October 25, 2018, 8:16pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/14 "2018-10-25T20:16:30Z")

</div>

The commands that are given open up a new notebook at the directory. If you already have notebooks open, just go to the directory where DiffEqTutorials is downloaded to and you’ll find the notebooks there.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [October 25, 2018, 8:28pm UTC](https://discourse.julialang.org/t/viewing-the-notebooks-locally/16574/15 "2018-10-25T20:28:40Z")

</div>

My point was just that the package manager was written to manage packages

> [@ChrisRackauckas](#):
>
> I was just using the package manager since I’m not sure how to download the repo’s master using Base Julia without it.

`LibGit2.clone("https://github.com/JuliaDiffEq/DiffEqTutorials.jl", "DiffEqTutorials")` or something? But `dev` from Pkg would probably also work, its just a bit odd since you assume that installs a package.

FWIW, I think it makes sense to bundle a Project + Manifest so that users can install the exact versions of the packages the notebook was built for. Full deployment could then be

```julia
LibGit2.clone("https://github.com/JuliaDiffEq/DiffEqTutorials.jl", "DiffEqTutorials")
cd("DiffEqTutorials")
Pkg.activate(".")
Pkg.instantiate()

```
