# PowerModels and JuMP version conflict

**URL:** https://discourse.julialang.org/t/powermodels-and-jump-version-conflict/24337
**Category:** New to Julia
**Tags:** question, package
**Created:** [May 17, 2019, 8:59pm UTC](https://discourse.julialang.org/t/powermodels-and-jump-version-conflict/24337 "2019-05-17T20:59:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jchen975](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jchen975/32/8994_2.png) [@jchen975](https://discourse.julialang.org/u/jchen975)
#### Post date: [May 17, 2019, 8:59pm UTC](https://discourse.julialang.org/t/powermodels-and-jump-version-conflict/24337/1 "2019-05-17T20:59:03Z")

</div>

Hi there, I’m trying to use the PowerModels package for a power flow project, however I’m having the following issue:

 ![Capture](https://global.discourse-cdn.com/julialang/original/3X/b/c/bc18da35415e2cd5445fbe009cec0dc50d471041.png)

Anyone knows how to fix this?

---

<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: [May 17, 2019, 10:26pm UTC](https://discourse.julialang.org/t/powermodels-and-jump-version-conflict/24337/2 "2019-05-17T22:26:22Z")

</div>

See [Error while adding a package - #3 by Arsenii\_Grinchenko](https://discourse.julialang.org/t/error-while-adding-a-package/24176/3). (You can use the search tool to look for previously answered questions.)

---

<div class="post-metadata">

### Author: ![jchen975](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jchen975/32/8994_2.png) [@jchen975](https://discourse.julialang.org/u/jchen975)
#### Post date: [May 18, 2019, 4:42am UTC](https://discourse.julialang.org/t/powermodels-and-jump-version-conflict/24337/3 "2019-05-18T04:42:56Z")

</div>

I tried ]` add PowerModels` then `] add JuMP`, however that restricted my JuMP to v0.18.5 and apparently `JuMP.with_optimizer` isn’t available until v0.19.0 or higher. So I tried to remove both, `] add JuMP` and now I have the newest JuMP but cannot install PowerModels anymore (in the last section of my error message, if I’m understanding this correctly, PowerModels v0.9.6 would not cause a conflict with JuMP v0.19.1). I have no idea how to proceed. I might have to switch back to Matpower with Matlab instead.

---

<div class="post-metadata">

### Author: ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)
#### Post date: [May 18, 2019, 5:34am UTC](https://discourse.julialang.org/t/powermodels-and-jump-version-conflict/24337/4 "2019-05-18T05:34:25Z")

</div>

You will see on the other thread that `Pkg` environments will trivially solve this issue for you. You can find the `Pkg` documentation here: [2. Getting Started · Pkg.jl](https://julialang.github.io/Pkg.jl/dev/getting-started/).

> [@jchen975](#):
>
> I might have to switch back to Matpower with Matlab instead.

You probably didn’t mean it negatively, but these kinds of comments are not really relevant and generally discouraged. Use whatever tool is best for the job.

---

<div class="post-metadata">

### Author: ![leethargo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/leethargo/32/6004_2.png) [@leethargo](https://discourse.julialang.org/u/leethargo)
#### Post date: [May 18, 2019, 6:17am UTC](https://discourse.julialang.org/t/powermodels-and-jump-version-conflict/24337/5 "2019-05-18T06:17:42Z")

</div>

Starting with a fresh environment, this works for me (removed some output):

```julia
$ mkdir tmp
$ cd tmp
$ julia
julia> ]
(v1.1) pkg> activate .
(tmp) pkg> add JuMP
(tmp) pkg> add PowerModels
(tmp) pkg> st
    Status `~/tmp/Project.toml`
  [4076af6c] JuMP v0.19.1
  [c36e90e8] PowerModels v0.10.0

```

Maybe some other packages in your project require a specific version of JuMP or PowerModels?

---

<div class="post-metadata">

### Author: ![jchen975](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jchen975/32/8994_2.png) [@jchen975](https://discourse.julialang.org/u/jchen975)
#### Post date: [May 18, 2019, 7:41pm UTC](https://discourse.julialang.org/t/powermodels-and-jump-version-conflict/24337/6 "2019-05-18T19:41:14Z")

</div>

So it turns out that I had JuliaPro (which I thought was the only thing there was) and uninstalled it, installed Julia and now it’s working. And my apologies for mentioning Matlab. I definitely didn’t mean anything negative, and I only switched from it because I thought Julia would have better performance and was quite frustrated by the error these past few days. So hopefully now everything will work fine.
