# How do PyCall use already existed Python with installed packages

**URL:** <https://discourse.julialang.org/t/how-do-pycall-use-already-existed-python-with-installed-packages/39930>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [May 22, 2020, 2:56am UTC](https://discourse.julialang.org/t/how-do-pycall-use-already-existed-python-with-installed-packages/39930 "2020-05-22T02:56:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BMval](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bmval/32/7647_2.png) [@BMval](https://discourse.julialang.org/u/BMval)\
**Post date:** [May 22, 2020, 2:56am UTC](https://discourse.julialang.org/t/how-do-pycall-use-already-existed-python-with-installed-packages/39930/1 "2020-05-22T02:56:38Z")

</div>

Would you suggest, How do PyCall use already existed Python with installed packages.

thank you in advance.

---

<div class="post-metadata">

**Author:** ![lungben](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lungben/32/12314_2.png) [@lungben](https://discourse.julialang.org/u/lungben)\
**Post date:** [May 22, 2020, 7:25am UTC](https://discourse.julialang.org/t/how-do-pycall-use-already-existed-python-with-installed-packages/39930/2 "2020-05-22T07:25:16Z")

</div>

When using Conda, the following steps should do it (if I remember correctly):

1. activate the corresponding Conda environment
2. start Julia
3. `] build PyCall` (only required if PyCall has been bulit with different Python version/ env before)

---

<div class="post-metadata">

**Author:** ![Johan\_Andries](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johan_andries/32/15081_2.png) [@Johan\_Andries](https://discourse.julialang.org/u/Johan_Andries)\
**Post date:** [May 22, 2020, 9:10am UTC](https://discourse.julialang.org/t/how-do-pycall-use-already-existed-python-with-installed-packages/39930/3 "2020-05-22T09:10:26Z")

</div>

You can do

```julia
ENV["PYTHON"] = "/path/to/python-binary-with-packages/installed"

```

at the start of your script. For example

```julia
ENV["PYTHON"] = "/home/my-username/my-python-3.7/bin/python"

```
