# How run examples in AstronNbodySim

**URL:** <https://discourse.julialang.org/t/how-run-examples-in-astronnbodysim/74960>\
**Category:** New to Julia\
**Created:** [January 20, 2022, 10:27pm UTC](https://discourse.julialang.org/t/how-run-examples-in-astronnbodysim/74960 "2022-01-20T22:27:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![murrayE](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/murraye/32/24428_2.png) [@murrayE](https://discourse.julialang.org/u/murrayE)\
**Post date:** [January 20, 2022, 10:27pm UTC](https://discourse.julialang.org/t/how-run-examples-in-astronnbodysim/74960/1 "2022-01-20T22:27:19Z")

</div>

From the REPL, I installed the AstroNbodySim package by `]add AstroNbodySim`. Next, inside my usual `~/Documents/julia` directory for projects, I used `] generate Nbody` and then `] activate Nbody`.

I want to run some of the examples in the package’s Examples directory. But the installation I did, following the docs, did _not_ seem to add the files from subdirectoires Benchmark, docs, examples, or test at [https://github.com/JuliaAstroSim/AstroNbodySim.jl](https://github.com/JuliaAstroSim/AstroNbodySim.jl). So I downloaded the whole zip from there, unzipped, and moved the Benchmark, docs, examples, and test directories into `~/Documents/julia/Nbody`.

Still, if I execute, say `include("examples/07-solarsystem/07-solarsystem.jl")`, I get `LoadError: ArgumentError: Package AstroPlot not found in current path:

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

Please patiently explain to me what I am doing wrong.

I am still utterly flummoxed by Julia’s package and environment conceptual framework!

---

<div class="post-metadata">

**Author:** ![xzackli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xzackli/32/38301_2.png) [@xzackli](https://discourse.julialang.org/u/xzackli)\
**Post date:** [January 21, 2022, 2:24am UTC](https://discourse.julialang.org/t/how-run-examples-in-astronnbodysim/74960/2 "2022-01-21T02:24:33Z")

</div>

The example script you wanted to run attempts to import AstroPlot. It seems like your active environment doesn’t have the AstroPlot package, so you’ll have to follow its suggestion and add it.

---

<div class="post-metadata">

**Author:** ![murrayE](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/murraye/32/24428_2.png) [@murrayE](https://discourse.julialang.org/u/murrayE)\
**Post date:** [January 21, 2022, 8:59pm UTC](https://discourse.julialang.org/t/how-run-examples-in-astronnbodysim/74960/3 "2022-01-21T20:59:20Z")

</div>

OK, thanks! I misinterpreted the docs for AstroNbodySim as to say the various required package were included.

Alas, after adding no tonly AstroPlot, but other packages required for the example, I finally got `LoadError: SystemError: opening file "output/success": No such file or directory`, with the StackTrace indicating a call from `~/.julia/packages/CUDA/nYggH/src/initialization.jl`. Since my iMac uses Radeon graphics, not nVidia, this suggests that this example, and possibly the others or anything done with the AstroNbodySim package are doomed to failure on my system.
