I’m hoping to run some simulations from a shell script. The structure is something like:
parent
\__ Manifest.toml
\__ Project.toml
\__dir
\__ sim.sh
\__ env.jl
\__ simulate.jl
where sim.sh
contains
#!/bin/sh
julia simulate.jl
simulate.jl
contains
include("env.jl")
println("...now running simulations...")
and env.jl
contains
using Pkg
Pkg.activate("../.")
Pkg.instantiate()
to pull from Manifest/Project files I have in parent/
. However, when I run $ ./sim.sh
, I get the following error:
ERROR: LoadError: ArgumentError: Module Pkg not found in current path.
Run `Pkg.add("Pkg")` to install the Pkg package.
Stacktrace:
[1] _require(::Symbol) at ./loading.jl:428
[2] require(::Symbol) at ./loading.jl:398
[3] include_from_node1(::String) at ./loading.jl:569
[4] include(::String) at ./sysimg.jl:14
[5] process_options(::Base.JLOptions) at ./client.jl:305
[6] _start() at ./client.jl:371
Am I doing something wrong??
Here’s my version info:
Julia Version 1.1.0
Commit 80516ca202 (2019-01-21 21:24 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin14.5.0)
CPU: Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_LOAD_PATH = ...