# Can't change python bin in PyCall

**URL:** <https://discourse.julialang.org/t/cant-change-python-bin-in-pycall/73736>\
**Category:** General Usage\
**Tags:** pycall\
**Created:** [December 28, 2021, 11:02pm UTC](https://discourse.julialang.org/t/cant-change-python-bin-in-pycall/73736 "2021-12-28T23:02:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon69491625](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Post date:** [December 28, 2021, 11:02pm UTC](https://discourse.julialang.org/t/cant-change-python-bin-in-pycall/73736/1 "2021-12-28T23:02:47Z")

</div>

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?

```julia

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/"

Pkg.build("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.

```julia
$ which python3
/usr/bin/python3

```

thank you

---

<div class="post-metadata">

**Author:** ![sashmit](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sashmit/32/18791_2.png) [@sashmit](https://discourse.julialang.org/u/sashmit)\
**Post date:** [December 28, 2021, 11:07pm UTC](https://discourse.julialang.org/t/cant-change-python-bin-in-pycall/73736/2 "2021-12-28T23:07:53Z")

</div>

have you tried?

ENV[“PYTHON”]=“/usr/bin/python3”

---

<div class="post-metadata">

**Author:** ![anon69491625](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@anon69491625](https://discourse.julialang.org/u/anon69491625)\
**Post date:** [December 28, 2021, 11:16pm UTC](https://discourse.julialang.org/t/cant-change-python-bin-in-pycall/73736/3 "2021-12-28T23:16:23Z")

</div>

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