# How do I rebuild PyCall in Pluto

**URL:** <https://discourse.julialang.org/t/how-do-i-rebuild-pycall-in-pluto/73690>\
**Category:** New to Julia\
**Tags:** pycall, pluto\
**Created:** [December 27, 2021, 11:57pm UTC](https://discourse.julialang.org/t/how-do-i-rebuild-pycall-in-pluto/73690 "2021-12-27T23:57:07Z")\
**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 27, 2021, 11:57pm UTC](https://discourse.julialang.org/t/how-do-i-rebuild-pycall-in-pluto/73690/1 "2021-12-27T23:57:07Z")

</div>

I have to change my Python to run a specific version. I know I have to rebuild PyCall but I am doing something wrong. I have used PyCall using Pluto’s internal Pkg manager but when I run the cell

Pkg.build(“PyCall”)

I get

```julia
UndefVarError: Pkg not defined
    top-level scope@Local: 1

```

What am I doing wrong please?

here’s the Pluto code

```julia
ENV["PYTHON"]="/usr/bin/python3/"
using PyCall
Pkg.build("PyCall")

```

---

<div class="post-metadata">

**Author:** ![magister-ludi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/magister-ludi/32/4003_2.png) [@magister-ludi](https://discourse.julialang.org/u/magister-ludi)\
**Post date:** [December 28, 2021, 1:26am UTC](https://discourse.julialang.org/t/how-do-i-rebuild-pycall-in-pluto/73690/2 "2021-12-28T01:26:48Z")

</div>

Did you remember to do

```julia
using Pkg

```

before calling `Pkg.build`?

---

<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, 2:39am UTC](https://discourse.julialang.org/t/how-do-i-rebuild-pycall-in-pluto/73690/3 "2021-12-28T02:39:21Z")

</div>

OOOPS  
You were right @magister-ludi I hadn’t RUN the cell. I’m still getting used to the Pluto interface so I must have just typed it in and then clicked on another cell. I just ran the build and it worked. Thanks for helping a dullard out, I’ll just stop doing anything and binge watch Silicon Valley. Thanks again
