# PyCall Anaconda and PYTHONPATH variable

**URL:** <https://discourse.julialang.org/t/pycall-anaconda-and-pythonpath-variable/3845>\
**Category:** New to Julia\
**Created:** [May 22, 2017, 9:36am UTC](https://discourse.julialang.org/t/pycall-anaconda-and-pythonpath-variable/3845 "2017-05-22T09:36:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [May 22, 2017, 9:36am UTC](https://discourse.julialang.org/t/pycall-anaconda-and-pythonpath-variable/3845/1 "2017-05-22T09:36:36Z")

</div>

I am trying to setup PyCall to use my default Python in Windows but it keeps using its own Conda package. Here is what I get:

```julia
julia> ENV["PYTHON"]
"C:\\ProgramData\\Anaconda2"
julia> Pkg.build("PyCall")
INFO: Building Conda
INFO: Building PyCall
INFO: No system-wide Python was found; got the following error:
could not spawn setenv(`'C:\ProgramData\Anaconda2' -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'))"`,String[...long list of paths...]): no such file or directory (ENOENT)
using the Python distribution in the Conda package
Fetching package metadata ...

```

Also is there an equivalent to the PYTHONPATH variable in the Python distributon of Conda to be able to import some third party scripts?

---

<div class="post-metadata">

**Author:** ![avik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avik/32/17_2.png) [@avik](https://discourse.julialang.org/u/avik)\
**Post date:** [May 22, 2017, 12:33pm UTC](https://discourse.julialang.org/t/pycall-anaconda-and-pythonpath-variable/3845/2 "2017-05-22T12:33:29Z")

</div>

From the error message, I believe ENV[“PYTHON”] should point to the `python` executable, not to the directory.

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [May 22, 2017, 1:41pm UTC](https://discourse.julialang.org/t/pycall-anaconda-and-pythonpath-variable/3845/3 "2017-05-22T13:41:10Z")

</div>

Right perfect, now it works, thank you!
