mirror of
https://github.com/ANL-CEEESA/MIPLearn.jl.git
synced 2025-12-06 08:28:52 -06:00
Use python path from PyCall instaed of Conda.jl
This commit is contained in:
20
deps/build.jl
vendored
20
deps/build.jl
vendored
@@ -1,21 +1,11 @@
|
|||||||
using Conda
|
using Conda
|
||||||
|
using PyCall
|
||||||
|
|
||||||
function install_miplearn()
|
function install_miplearn()
|
||||||
paths = [joinpath(Conda.ROOTENV, "Scripts"),
|
Conda.update()
|
||||||
joinpath(Conda.ROOTENV, "Library", "bin"),
|
pip = joinpath(dirname(pyimport("sys").executable), "pip")
|
||||||
joinpath(Conda.ROOTENV, "bin")]
|
isfile(pip) || error("$pip: invalid path")
|
||||||
|
run(`$pip install miplearn==0.1.0`)
|
||||||
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")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
Conda.update()
|
|
||||||
install_miplearn()
|
install_miplearn()
|
||||||
|
|||||||
Reference in New Issue
Block a user