# How to solve this error while installing SCENRED2

**URL:** https://discourse.julialang.org/t/how-to-solve-this-error-while-installing-scenred2/35413
**Category:** Optimization (Mathematical)
**Tags:** package
**Created:** [March 2, 2020, 2:56pm UTC](https://discourse.julialang.org/t/how-to-solve-this-error-while-installing-scenred2/35413 "2020-03-02T14:56:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![SAH](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@SAH](https://discourse.julialang.org/u/SAH)
#### Post date: [March 2, 2020, 2:56pm UTC](https://discourse.julialang.org/t/how-to-solve-this-error-while-installing-scenred2/35413/1 "2020-03-02T14:56:17Z")

</div>

I am trying to add a scenario reduction package [[available here]](https://github.com/trigaut/Scenred2.jl/blob/master/README.md) in Julia and getting an error. In fact, I run these 2 lines as discribed in the link:

```julia
julia> Pkg.clone("https://github.com/trigaut/Scenred2.jl.git")
julia> Pkg.build("Scenred2")

```

```julia
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.

---

<div class="post-metadata">

### Author: ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)
#### Post date: [March 2, 2020, 3:46pm UTC](https://discourse.julialang.org/t/how-to-solve-this-error-while-installing-scenred2/35413/2 "2020-03-02T15:46:18Z")

</div>

See [Remove `using Pkg` in `build.jl` by odow · Pull Request #2 · trigaut/Scenred2.jl · GitHub](https://github.com/trigaut/Scenred2.jl/pull/2).

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")`.

---

<div class="post-metadata">

### Author: ![trigaut](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/trigaut/32/1911_2.png) [@trigaut](https://discourse.julialang.org/u/trigaut)
#### Post date: [March 9, 2020, 2:41pm UTC](https://discourse.julialang.org/t/how-to-solve-this-error-while-installing-scenred2/35413/3 "2020-03-09T14:41:29Z")

</div>

@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.
