PyCall Anaconda and PYTHONPATH variable

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> 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?

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

Right perfect, now it works, thank you!