How to solve this error while installing SCENRED2

I am trying to add a scenario reduction package [available here] in Julia and getting an error. In fact, I run these 2 lines as discribed in the link:

julia> Pkg.clone("https://github.com/trigaut/Scenred2.jl.git")
julia> Pkg.build("Scenred2")
Error:
Building Scenred2 → `~/.julia/dev/Scenred2/deps/build.log`
┌ Error: Error building `Scenred2`: 
│ ERROR: LoadError: ArgumentError: Package Pkg not found in current path:
│ - Run `import Pkg; Pkg.add("Pkg")` to install the Pkg package.
│

P.S. I am using Julia 1.3.1 on a Mac OS.

See Remove `using Pkg` in `build.jl` by odow · Pull Request #2 · trigaut/Scenred2.jl · GitHub.

The easiest way is probably to run Pkg.dev("https://github.com/trigaut/Scenred2.jl.git"), and then modify the file ~/.Julia/dev/Scenred2/deps/build.jl with the same fix, then run Pkg.build("Scenred2").

1 Like

@odow is right. I tested and merged his fix in the master branch of Scenred2.jl .

Did you manage to use it @SAH ?

I will clean the package soon.