From 083a527a762c7b71b944cd44d5f70af2aea21ef3 Mon Sep 17 00:00:00 2001 From: Alinson S Xavier Date: Sun, 30 Aug 2020 11:13:32 -0500 Subject: [PATCH] Use python path from PyCall instaed of Conda.jl --- deps/build.jl | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/deps/build.jl b/deps/build.jl index ff7f43e..07fd56a 100644 --- a/deps/build.jl +++ b/deps/build.jl @@ -1,21 +1,11 @@ using Conda +using PyCall function install_miplearn() - paths = [joinpath(Conda.ROOTENV, "Scripts"), - joinpath(Conda.ROOTENV, "Library", "bin"), - joinpath(Conda.ROOTENV, "bin")] - - pip_found = false - for p in paths - if isfile("$p/pip3") - run(`$p/pip3 install miplearn==0.1.0`) - pip_found = true - break - end - end - - pip_found || error("Could not find pip") + Conda.update() + pip = joinpath(dirname(pyimport("sys").executable), "pip") + isfile(pip) || error("$pip: invalid path") + run(`$pip install miplearn==0.1.0`) end -Conda.update() install_miplearn()