Can't change python bin in PyCall

Hi all
I am using Pluto and want to change PyCall python from conda to the one I use for a script I want to run that has a particular import that conda doesn’t have. I read the PyCall docs and “think” I am doing everything correctly but it’s not working. What did I miss please?

using PyCall
using Pkg

PyCall.python  # to check current version returns "/home/dave/.julia/conda/3/bin/python"

ENV["PYTHON"]="/usr/bin/python3/" # changing to MY chosen python returns "/usr/bin/python3/""PyCall") # rebuild PyCall as per docs

PyCall.python # check to see if it works NOPE returns "/home/dave/.julia/conda/3/bin/python"

What am I missing please? My expectation was that the PyCall.python would return “/usr/bin/python3/”

If I run which on python3 I get the below so that’s why I use it.

$ which python3

thank you

have you tried?


1 Like

it’s humble pie time again. I JUST spotted that. THEN I checked the build log for PyCall and it all became very clear. You spotted it right away, I have been staring at this for a day. My only excuse is that I am binge watching Silicon Valley. Thank you so much for taking the time.