# Error in using PyPlot in JuliaPro

**URL:** https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400
**Category:** New to Julia
**Created:** [June 18, 2019, 10:58am UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400 "2019-06-18T10:58:46Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![BobbyLee777](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@BobbyLee777](https://discourse.julialang.org/u/BobbyLee777)
#### Post date: [June 18, 2019, 10:58am UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/1 "2019-06-18T10:58:46Z")

</div>

Can anyone tell me why the PyPlot doesn’t work even though I have installed PyPlot and PyCall ?  
The version of my JuliaPro is 1.1.1.1.

Here is the error message:

> julia\> using PyPlot  
> [Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]  
> ERROR: LoadError: LoadError: PyCall not properly installed. Please run Pkg.build(“PyCall”)  
> Stacktrace:  
> [1] error(::String) at .\error.jl:33  
> [2] top-level scope at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\src\startup.jl:44 [inlined]  
> [3] top-level scope at .\none:0  
> [4] include at .\boot.jl:326 [inlined]  
> [5] include\_relative(::Module, ::String) at .\loading.jl:1038  
> [6] include at .\sysimg.jl:29 [inlined]  
> [7] include(::String) at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\src\PyCall.jl:1  
> [8] top-level scope at none:0  
> [9] include at .\boot.jl:326 [inlined]  
> [10] include\_relative(::Module, ::String) at .\loading.jl:1038  
> [11] include(::Module, ::String) at .\sysimg.jl:29  
> [12] top-level scope at none:2  
> [13] eval at .\boot.jl:328 [inlined]  
> [14] eval(::Expr) at .\client.jl:404  
> [15] top-level scope at .\none:3  
> in expression starting at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\src\startup.jl:41  
> in expression starting at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\src\PyCall.jl:41  
> ERROR: LoadError: Failed to precompile PyCall [438e738f-606a-5dbb-bf0a-cddfbfd45ab0] to C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\compiled\v1.1\PyCall\GkzkC.ji.  
> Stacktrace:  
> [1] error(::String) at .\error.jl:33  
> [2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1197  
> [3] \_require(::Base.PkgId) at .\loading.jl:960  
> [4] require(::Base.PkgId) at .\loading.jl:858  
> [5] require(::Module, ::Symbol) at .\loading.jl:853  
> [6] include at .\boot.jl:326 [inlined]  
> [7] include\_relative(::Module, ::String) at .\loading.jl:1038  
> [8] include(::Module, ::String) at .\sysimg.jl:29  
> [9] top-level scope at none:2  
> [10] eval at .\boot.jl:328 [inlined]  
> [11] eval(::Expr) at .\client.jl:404  
> [12] top-level scope at .\none:3  
> in expression starting at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyPlot\cdCMF\src\PyPlot.jl:4  
> ERROR: Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\compiled\v1.1\PyPlot\oatAj.ji.  
> Stacktrace:  
> [1] compilecache(::Base.PkgId, ::String) at .\loading.jl:1197  
> [2] \_require(::Base.PkgId) at .\loading.jl:960  
> [3] require(::Base.PkgId) at .\loading.jl:858  
> [4] require(::Module, ::Symbol) at .\loading.jl:853`

`

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [June 18, 2019, 1:49pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/2 "2019-06-18T13:49:42Z")

</div>

Please read the error message carefully:

> [@BobbyLee777](#):
>
> ```julia
> Please run Pkg.build(“PyCall”)
> 
> ```

---

<div class="post-metadata">

### Author: ![BobbyLee777](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@BobbyLee777](https://discourse.julialang.org/u/BobbyLee777)
#### Post date: [June 18, 2019, 2:19pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/3 "2019-06-18T14:19:14Z")

</div>

Thanks for your reply.

Certainly I had done it before, but it just raised another error, and that is why I felt confused, because I think I had installed the packages correctly.

Maybe it is related to the environment, but I can not understand why it happened. I wish you can help me out.

Here is the error message:

> julia\> Pkg.build(“PyCall”)  
> Building Conda ─→ `C:\Users\86139\.juliapro\JuliaPro_v1.1.1.1\packages\Conda\CpuvI\deps\b uild.log`  
> Building PyCall → `C:\Users\86139\.juliapro\JuliaPro_v1.1.1.1\packages\PyCall\ttONZ\deps\ build.log`  
> ┌ Error: Error building `PyCall`:  
> │ ┌ Info: Using the Python distribution in the Conda package by default.  
> │ └ To use a different Python version, set ENV[“PYTHON”]=“pythoncommand” and re-run Pkg.build(“PyCall”).  
> │ ERROR: LoadError: IOError: could not spawn setenv(`'C:\Users\86139\AppData\Local\Temp\python.exe' 'C:\Users\86139\.juliapro\JuliaPro_v1.1.1.1\packages\PyCall\ttONZ\deps\find_libpython.py' --list-all`,[“USERDOMAIN\_ROAMINGPROFILE=DESKTOP-F6AESQP”, “DISABLE\_FALLBACK=true”, “HOMEPATH=\Users\86139”, “ProgramData=C:\ProgramData”, “ProgramW6432=C:\Program Files”, “[PATHEXT=.COM](http://PATHEXT=.COM);.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL”, “NODE\_ENV=production”, “SESSIONNAME=Console”, “GKS\_USE\_CAIRO\_PNG=true”, “APPDATA=C:\Users\86139\AppData\Roaming”, “PUBLIC=C:\Users\Public”, “USERDOMAIN=DESKTOP-F6AESQP”, “OS=Windows\_NT”, “PROCESSOR\_REVISION=8e0a”, “PyCharm=D:\JetBrains\PyCharm 2018.3.5\bin;”, “TMP=C:\Users\86139\AppData\Local\Temp”, “JULIA\_EDITOR="D:\JuliaPro-1.1.1.1\app-1.36.0\atom.exe" -a”, “ALLUSERSPROFILE=C:\ProgramData”, “Path=D:\JuliaPro-1.1.1.1\Julia-1.1.1\share\julia\stdlib\v1.1\MbedTLS;D:\JuliaPro-1.1.1.1\Julia-1.1.1\share\julia\stdlib\v1.1\MbedTLS\deps\usr\bin;D:\JuliaPro-1.1.1.1\Julia-1.1.1\share\julia\stdlib\v1.1\MbedTLS;D:\JuliaPro-1.1.1.1\Julia-1.1.1\share\julia\stdlib\v1.1\MbedTLS\deps\usr\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;D:\Polyspace\R2019a\runtime\win64;D:\Polyspace\R2019a\bin;D:\Polyspace\R2019a\polyspace\bin;C:\Users\86139\AppData\Local\Programs\Python\Python37\Scripts;C:\Users\86139\AppData\Local\Programs\Python\Python37;C:\Users\86139\AppData\Local\Microsoft\WindowsApps;C:\Users\86139\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\86139\AppData\Local\GitHubDesktop\bin;D:\JetBrains\PyCharm 2018.3.5\bin;;C:\Program Files\Java\jdk-12\bin;”, “COMPUTERNAME=DESKTOP-F6AESQP”, “GKSwstype=svg”, “JAVA\_HOME=C:\Program Files\Java\jdk-12”, “USERNAME=86139”, “CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files”, “CommonProgramFiles=C:\Program Files\Common Files”, “CLASSPATH=.;C:\Program Files\Java\jdk-12\lib;C:\Program Files\Java\jdk-12\lib\tools.jar”, “USERPROFILE=C:\Users\86139”, “GOOGLE\_API\_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q”, “PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Users\86139\Documents\WindowsPowerShell\Modules;C:\Program Files  
> (x86)\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules”,  
> “PROCESSOR\_LEVEL=6”, “JULIA\_PKG\_TOKEN\_PATH=C:\Users\86139\.juliapro\token.toml”, “=C:=C:\Users\86139\.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps”, “TERM=xterm-256color”, “SystemDrive=C:”, “HOMEDRIVE=C:”, “TEMP=C:\Users\86139\AppData\Local\Temp”, “PYTHONIOENCODING=UTF-8”, “NODE\_PATH=D:\JuliaPro-1.1.1.1\app-1.36.0\resources\app.asar\exports”, “LOCALAPPDATA=C:\Users\86139\AppData\Local”, “PROCESSOR\_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel”, “DriverData=C:\Windows\System32\Drivers\DriverData”, “NUMBER\_OF\_PROCESSORS=8”, “ComSpec=C:\Windows\system32\cmd.exe”, “SystemRoot=C:\Windows”, “JULIA\_PKG\_SERVER=[https://pkg.juliacomputing.com/](https://pkg.juliacomputing.com/)”, “OneDrive=C:\Users\86139\OneDrive - CUHK-ShenZhen”, “GKS\_FILEPATH=C:\Users\86139\AppData\Local\Temp\jl\_AAA0.tmp.png”, “JULIA\_NUM\_THREADS=4”, “ProgramFiles(x86)=C:\Program Files (x86)”, “GRDIR=C:\Users\86139\.juliapro\JuliaPro\_v1.1.1.1\packages\GR\jmltz\src\…\deps\gr”, “PSExecutionPolicyPreference=Bypass”, “JUNORC\_PATH=D:\JuliaPro-1.1.1.1\.atom”, “GKS\_FONTPATH=C:\Users\86139\.juliapro\JuliaPro\_v1.1.1.1\packages\GR\jmltz\src\…\deps\gr”, “LOGONSERVER=\\DESKTOP-F6AESQP”, “windir=C:\Windows”, “OneDriveCommercial=C:\Users\86139\OneDrive - CUHK-ShenZhen”, “ATOM\_HOME=D:\JuliaPro-1.1.1.1\.atom”, “JULIA\_LOAD\_PATH=@;C:\Users\86139\AppData\Local\Temp\jl\_12D2.tmp”, “CommonProgramW6432=C:\Program Files\Common Files”, “ProgramFiles=C:\Program Files”, “PROCESSOR\_ARCHITECTURE=AMD64”, “OPENBLAS\_MAIN\_FREE=1”]): no such file or directory (ENOENT)  
> │ Stacktrace:  
> │ [1] \_spawn\_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:400  
> │ [2] #505 at .\process.jl:413 [inlined]  
> │ [3] setup\_stdios(::getfield(Base, Symbol(“##505#506”)){Cmd}, ::Array{Any,1}) at .\process.jl:497  
> │ [4] \_spawn at .\process.jl:412 [inlined]  
> │ [5] #eachline#511(::Bool, ::Function, ::Cmd) at .\process.jl:618  
> │ [6] eachline at .\process.jl:617 [inlined]  
> │ [7] #readlines#288 at .\io.jl:414 [inlined]  
> │ [8] readlines at .\io.jl:414 [inlined]  
> │ [9] exec\_find\_libpython at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\buildutils.jl:28 [inlined]  
> │ [10] #find\_libpython#3(::typeof(Libdl.dlopen), ::Function, ::String) at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\buildutils.jl:43  
> │ [11] find\_libpython(::String) at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\buildutils.jl:41  
> │ [12] top-level scope at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\build.jl:87  
> │ [13] include at .\boot.jl:326 [inlined]  
> │ [14] include\_relative(::Module, ::String) at .\loading.jl:1038  
> │ [15] include(::Module, ::String) at .\sysimg.jl:29  
> │ [16] include(::String) at .\client.jl:403  
> │ [17] top-level scope at none:0  
> │ in expression starting at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\build.jl:43  
> └ @ Pkg.Operations C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\Pkg\src\Operations.jl:1138

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [June 18, 2019, 2:36pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/4 "2019-06-18T14:36:17Z")

</div>

It looks like it cannot start the Python executable, but I am not familiar enough with Windows to help further. Perhaps someone will have a suggestion.

---

<div class="post-metadata">

### Author: ![Harsha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/harsha/32/1985_2.png) [@Harsha](https://discourse.julialang.org/u/Harsha)
#### Post date: [June 18, 2019, 3:56pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/5 "2019-06-18T15:56:04Z")

</div>

> C:\Users\86139\AppData\Local\Programs\Python\Python37\Scripts;C:\Users\86139\AppData\Local\Programs\Python\Python37;

Apart from Conda, looks like you have a different Python installation in above paths, can you try using this Python installation to setup PyCall? You can do this by setting ` ENV[“PYTHON”] = <FULL_PATH_TO_PYTHON.EXE>` and running `Pkg.build(“PyCall”)`. I’m not sure why the Python that’s shipped with `Conda.jl` is not working for you (Maybe a conflict with your Python installation?)

---

<div class="post-metadata">

### Author: ![BobbyLee777](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@BobbyLee777](https://discourse.julialang.org/u/BobbyLee777)
#### Post date: [June 18, 2019, 4:33pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/6 "2019-06-18T16:33:43Z")

</div>

Thanks for your reply.

I have tried setting path as mentioned, but it still doesn’t work, which seemingly indicates that Julia can not find my path.

Here is the error message:

> julia\> ENV[“PYTHON”] = “C:\\Users\\86139\\AppData\\Local\\Programs\\Python\\Python37”  
> “C:\\Users\\86139\\AppData\\Local\\Programs\\Python\\Python37”

> julia\> Pkg.build(“PyCall”)  
> Building Conda ─→ `C:\Users\86139\.juliapro\JuliaPro_v1.1.1.1\packages\Conda\CpuvI\deps\bu ild.log`  
> Building PyCall → `C:\Users\86139\.juliapro\JuliaPro_v1.1.1.1\packages\PyCall\ttONZ\deps\b uild.log`  
> ┌ Error: Error building `PyCall`:  
> │ ┌ Info: No system-wide Python was found; got the following error:  
> │ │ Base.IOError(“could not spawn setenv(`'C:\\\\Users\\\\86139\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37' -c \"import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'))\"`,["USERDOMAIN\_ROAMINGPROFILE=DESKTOP-F6AESQP", "DISABLE\_FALLBACK=true", "HOMEPATH=\\Users\\86139", "ProgramData=C:\\ProgramData", "ProgramW6432=C:\\Program Files", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL", "NODE\_ENV=production", "SESSIONNAME=Console", "APPDATA=C:\\Users\\86139\\AppData\\Roaming", "PUBLIC=C:\\Users\\Public", "USERDOMAIN=DESKTOP-F6AESQP", "OS=Windows\_NT", "PROCESSOR\_REVISION=8e0a", "PyCharm=D:\\JetBrains\\PyCharm 2018.3.5\\bin;", "TMP=C:\\Users\\86139\\AppData\\Local\\Temp", "JULIA\_EDITOR=\"D:\\JuliaPro-1.1.1.1\\app-1.36.0\\atom.exe\" -a", "ALLUSERSPROFILE=C:\\ProgramData", "Path=D:\\JuliaPro-1.1.1.1\\Julia-1.1.1\\share\\julia\\stdlib\\v1.1\\MbedTLS;D:\\JuliaPro-1.1.1.1\\Julia-1.1.1\\share\\julia\\stdlib\\v1.1\\MbedTLS\\deps\\usr\\bin;D:\\JuliaPro-1.1.1.1\\Julia-1.1.1\\share\\julia\\stdlib\\v1.1\\MbedTLS;D:\\JuliaPro-1.1.1.1\\Julia-1.1.1\\share\\julia\\stdlib\\v1.1\\MbedTLS\\deps\\usr\\bin;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\iCLS\\;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Windows\\System32\\OpenSSH\\;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\DAL;C:\\Program Files (x86)\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files\\Intel\\Intel(R) Management Engine Components\\IPT;C:\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common;C:\\Program Files\\Intel\\WiFi\\bin\\;C:\\Program Files\\Common Files\\Intel\\WirelessCommon\\;C:\\Program Files\\Git\\cmd;C:\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR;D:\\Polyspace\\R2019a\\runtime\\win64;D:\\Polyspace\\R2019a\\bin;D:\\Polyspace\\R2019a\\polyspace\\bin;C:\\Users\\86139\\AppData\\Local\\Programs\\Python\\Python37\\Scripts;C:\\Users\\86139\\AppData\\Local\\Programs\\Python\\Python37;C:\\Users\\86139\\AppData\\Local\\Microsoft\\WindowsApps;C:\\Users\\86139\\AppData\\Local\\Programs\\Microsoft VS Code\\bin;C:\\Users\\86139\\AppData\\Local\\GitHubDesktop\\bin;D:\\JetBrains\\PyCharm 2018.3.5\\bin;;C:\\Program Files\\Java\\jdk-12\\bin;", "COMPUTERNAME=DESKTOP-F6AESQP", "JAVA\_HOME=C:\\Program Files\\Java\\jdk-12", "USERNAME=86139", "CommonProgramFiles(x86)=C:\\Program Files (x86)\\Common Files", "CommonProgramFiles=C:\\Program Files\\Common Files", "CLASSPATH=.;C:\\Program Files\\Java\\jdk-12\\lib;C:\\Program Files\\Java\\jdk-12\\lib\\tools.jar", "USERPROFILE=C:\\Users\\86139", "GOOGLE\_API\_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q", "PSModulePath=C:\\Program Files\\WindowsPowerShell\\Modules;C:\\Users\\86139\\Documents\\WindowsPowerShell\\Modules;C:\\Program Files (x86)\\WindowsPowerShell\\Modules;C:\\Windows\\system32\\WindowsPowerShell\\v1.0\\Modules", "PROCESSOR\_LEVEL=6", "python=C:\\\\Users\\\\86139\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37", "JULIA\_PKG\_TOKEN\_PATH=C:\\Users\\86139\\.juliapro\\token.toml", "=C:=C:\\Users\\86139\\.juliapro\\JuliaPro\_v1.1.1.1\\packages\\PyCall\\ttONZ\\deps", "TERM=xterm-256color", "SystemDrive=C:", "HOMEDRIVE=C:", "TEMP=C:\\Users\\86139\\AppData\\Local\\Temp", "PYTHONIOENCODING=UTF-8", "NODE\_PATH=D:\\JuliaPro-1.1.1.1\\app-1.36.0\\resources\\app.asar\\exports", "LOCALAPPDATA=C:\\Users\\86139\\AppData\\Local", "PROCESSOR\_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel", "DriverData=C:\\Windows\\System32\\Drivers\\DriverData", "NUMBER\_OF\_PROCESSORS=8", "ComSpec=C:\\Windows\\system32\\cmd.exe", "SystemRoot=C:\\Windows", "JULIA\_PKG\_SERVER=[https://pkg.juliacomputing.com/\](https://pkg.juliacomputing.com/%5C)”, "OneDrive=C:\\Users\\86139\\OneDrive - CUHK-ShenZhen", "ProgramFiles(x86)=C:\\Program Files (x86)", "JULIA\_NUM\_THREADS=4", "PSExecutionPolicyPreference=Bypass", "JUNORC\_PATH=D:\\JuliaPro-1.1.1.1\\.atom", "LOGONSERVER=\\\\DESKTOP-F6AESQP", "windir=C:\\Windows", "OneDriveCommercial=C:\\Users\\86139\\OneDrive - CUHK-ShenZhen", "ATOM\_HOME=D:\\JuliaPro-1.1.1.1\\.atom", "JULIA\_LOAD\_PATH=@;C:\\Users\\86139\\AppData\\Local\\Temp\\jl\_568B.tmp", "CommonProgramW6432=C:\\Program Files\\Common Files", "ProgramFiles=C:\\Program Files", "PROCESSOR\_ARCHITECTURE=AMD64", "OPENBLAS\_MAIN\_FREE=1"]): no such file or directory (ENOENT)“, -4058)  
> │ └ using the Python distribution in the Conda package  
> │ ERROR: LoadError: IOError: could not spawn setenv(`'C:\Users\86139\AppData\Local\Temp\python.exe' 'C:\Users\86139\.juliapro\JuliaPro_v1.1.1.1\packages\PyCall\ttONZ\deps\find_libpython.py' --list-all`,[“USERDOMAIN\_ROAMINGPROFILE=DESKTOP-F6AESQP”, “DISABLE\_FALLBACK=true”, “HOMEPATH=\Users\86139”, “ProgramData=C:\ProgramData”, “ProgramW6432=C:\Program Files”, “[PATHEXT=.COM](http://PATHEXT=.COM);.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL”, “NODE\_ENV=production”, “SESSIONNAME=Console”, “APPDATA=C:\Users\86139\AppData\Roaming”, “PUBLIC=C:\Users\Public”, “USERDOMAIN=DESKTOP-F6AESQP”, “OS=Windows\_NT”, “PROCESSOR\_REVISION=8e0a”, “PyCharm=D:\JetBrains\PyCharm 2018.3.5\bin;”, “TMP=C:\Users\86139\AppData\Local\Temp”, “JULIA\_EDITOR="D:\JuliaPro-1.1.1.1\app-1.36.0\atom.exe" -a”, “ALLUSERSPROFILE=C:\ProgramData”, “Path=D:\JuliaPro-1.1.1.1\Julia-1.1.1\share\julia\stdlib\v1.1\MbedTLS;D:\JuliaPro-1.1.1.1\Julia-1.1.1\share\julia\stdlib\v1.1\MbedTLS\deps\usr\bin;D:\JuliaPro-1.1.1.1\Julia-1.1.1\share\julia\stdlib\v1.1\MbedTLS;D:\JuliaPro-1.1.1.1\Julia-1.1.1\share\julia\stdlib\v1.1\MbedTLS\deps\usr\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Git\cmd;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;D:\Polyspace\R2019a\runtime\win64;D:\Polyspace\R2019a\bin;D:\Polyspace\R2019a\polyspace\bin;C:\Users\86139\AppData\Local\Programs\Python\Python37\Scripts;C:\Users\86139\AppData\Local\Programs\Python\Python37;C:\Users\86139\AppData\Local\Microsoft\WindowsApps;C:\Users\86139\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\86139\AppData\Local\GitHubDesktop\bin;D:\JetBrains\PyCharm 2018.3.5\bin;;C:\Program Files\Java\jdk-12\bin;”, “COMPUTERNAME=DESKTOP-F6AESQP”, “JAVA\_HOME=C:\Program Files\Java\jdk-12”, “USERNAME=86139”, “CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files”, “CommonProgramFiles=C:\Program Files\Common Files”, “CLASSPATH=.;C:\Program Files\Java\jdk-12\lib;C:\Program Files\Java\jdk-12\lib\tools.jar”, “USERPROFILE=C:\Users\86139”, “GOOGLE\_API\_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q”, “PSModulePath=C:\Program Files\WindowsPowerShell\Modules;C:\Users\86139\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules”, “PROCESSOR\_LEVEL=6”, “python=C:\\Users\\86139\\AppData\\Local\\Programs\\Python\\Python37”, “JULIA\_PKG\_TOKEN\_PATH=C:\Users\86139\.juliapro\token.toml”,  
> “=C:=C:\Users\86139\.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps”, “TERM=xterm-256color”, “SystemDrive=C:”, “HOMEDRIVE=C:”, “TEMP=C:\Users\86139\AppData\Local\Temp”, “PYTHONIOENCODING=UTF-8”, “NODE\_PATH=D:\JuliaPro-1.1.1.1\app-1.36.0\resources\app.asar\exports”, “LOCALAPPDATA=C:\Users\86139\AppData\Local”, “PROCESSOR\_IDENTIFIER=Intel64 Family 6 Model 142 Stepping 10, GenuineIntel”, “DriverData=C:\Windows\System32\Drivers\DriverData”, “NUMBER\_OF\_PROCESSORS=8”, “ComSpec=C:\Windows\system32\cmd.exe”, “SystemRoot=C:\Windows”, “JULIA\_PKG\_SERVER=[https://pkg.juliacomputing.com/](https://pkg.juliacomputing.com/)”, “OneDrive=C:\Users\86139\OneDrive - CUHK-ShenZhen”, “ProgramFiles(x86)=C:\Program Files (x86)”, “JULIA\_NUM\_THREADS=4”, “PSExecutionPolicyPreference=Bypass”, “JUNORC\_PATH=D:\JuliaPro-1.1.1.1\.atom”, “LOGONSERVER=\\DESKTOP-F6AESQP”, “windir=C:\Windows”, “OneDriveCommercial=C:\Users\86139\OneDrive -  
> CUHK-ShenZhen”, “ATOM\_HOME=D:\JuliaPro-1.1.1.1\.atom”, “JULIA\_LOAD\_PATH=@;C:\Users\86139\AppData\Local\Temp\jl\_568B.tmp”, “CommonProgramW6432=C:\Program Files\Common Files”, “ProgramFiles=C:\Program Files”, “PROCESSOR\_ARCHITECTURE=AMD64”, “OPENBLAS\_MAIN\_FREE=1”]): no  
> such file or directory (ENOENT)  
> │ Stacktrace:  
> │ [1] \_spawn\_primitive(::String, ::Cmd, ::Array{Any,1}) at .\process.jl:400  
> │ [2] #505 at .\process.jl:413 [inlined]  
> │ [3] setup\_stdios(::getfield(Base, Symbol(”##505#506")){Cmd}, ::Array{Any,1}) at .\process.jl:497  
> │ [4] \_spawn at .\process.jl:412 [inlined]  
> │ [5] #eachline#511(::Bool, ::Function, ::Cmd) at .\process.jl:618  
> │ [6] eachline at .\process.jl:617 [inlined]  
> │ [7] #readlines#288 at .\io.jl:414 [inlined]  
> │ [8] readlines at .\io.jl:414 [inlined]  
> │ [9] exec\_find\_libpython at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\buildutils.jl:28 [inlined]  
> │ [10] #find\_libpython#3(::typeof(Libdl.dlopen), ::Function, ::String) at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\buildutils.jl:43  
> │ [11] find\_libpython(::String) at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\buildutils.jl:41  
> │ [12] top-level scope at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\build.jl:87  
> │ [13] include at .\boot.jl:326 [inlined]  
> │ [14] include\_relative(::Module, ::String) at .\loading.jl:1038  
> │ [15] include(::Module, ::String) at .\sysimg.jl:29  
> │ [16] include(::String) at .\client.jl:403  
> │ [17] top-level scope at none:0  
> │ in expression starting at C:\Users\86139.juliapro\JuliaPro\_v1.1.1.1\packages\PyCall\ttONZ\deps\build.jl:43  
> └ @ Pkg.Operations C:\Users\julia\AppData\Local\Julia-1.1.1\share\julia\stdlib\v1.1\Pkg\src\Operations.jl:1138

---

<div class="post-metadata">

### Author: ![cchderrick](https://avatars.discourse-cdn.com/v4/letter/c/ecd19e/32.png) [@cchderrick](https://discourse.julialang.org/u/cchderrick)
#### Post date: [June 18, 2019, 5:06pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/7 "2019-06-18T17:06:45Z")

</div>

> [@BobbyLee777](#):
>
> ```julia-repl
> Info: No system-wide Python was found; got the following error:
> │ │ Base.IOError(“could not spawn setenv( `'C:\\\\Users\\\\86139\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python37' -c \"import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'))\"` ,
> 
> ```

looks like there are too many `\\` so it couldn’t find Python, try `C:/Users/...` or `raw"C:\Users\...`?

Also your ENV have some sensitive information, you should edit it out.

---

<div class="post-metadata">

### Author: ![BobbyLee777](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@BobbyLee777](https://discourse.julialang.org/u/BobbyLee777)
#### Post date: [June 18, 2019, 5:35pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/8 "2019-06-18T17:35:04Z")

</div>

Thanks for your reminder.

I did checked all forms of path, but they all gave birth to the same results, even I use the form corresponding to the error message (just what you have seen).

Maybe I should try reinstalling my JuliaPro.

---

<div class="post-metadata">

### Author: ![Harsha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/harsha/32/1985_2.png) [@Harsha](https://discourse.julialang.org/u/Harsha)
#### Post date: [June 19, 2019, 5:14am UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/9 "2019-06-19T05:14:07Z")

</div>

> julia\> ENV[“PYTHON”] = “C:\Users\86139\AppData\Local\Programs\Python\Python37”

Above path is incorrect, `ENV[“PYTHON”]` should contain full path to `python.exe` binary and not a folder.

Example:- `ENV["PYTHON"] = "C:\\Python37-x64\\python.exe" `

You can refer to following documentation for more details: [GitHub - JuliaPy/PyCall.jl: Package to call Python functions from the Julia language](https://github.com/JuliaPy/PyCall.jl#specifying-the-python-version)

---

<div class="post-metadata">

### Author: ![BobbyLee777](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@BobbyLee777](https://discourse.julialang.org/u/BobbyLee777)
#### Post date: [June 19, 2019, 9:52am UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/10 "2019-06-19T09:52:45Z")

</div>

Thanks a lot!

I tried to search it in official documentation, but I failed. Your reference indeed helps me a lot!

---

<div class="post-metadata">

### Author: ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)
#### Post date: [June 19, 2019, 12:29pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/11 "2019-06-19T12:29:30Z")

</div>

A similar problem was reported here: [https://github.com/JuliaPy/PyCall.jl/issues/688](https://github.com/JuliaPy/PyCall.jl/issues/688)

Somehow, for some Windows users, Conda is getting installed in `AppData\Local\Temp` directory. Try doing

```julia
rm(joinpath(first(DEPOT_PATH), "conda", "deps.jl"))

```

to delete the stored preferences for Conda.jl followed by running

```julia
add Conda
build Conda
build PyCall

```

at the `pkg>` prompt.

If someone could shed light on why JuliaPro on Windows is installing Conda into the `AppData\Local\Temp` directory, that would be much appreciated.

---

<div class="post-metadata">

### Author: ![BobbyLee777](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@BobbyLee777](https://discourse.julialang.org/u/BobbyLee777)
#### Post date: [June 19, 2019, 3:58pm UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/12 "2019-06-19T15:58:15Z")

</div>

Thanks for your reply.

Unfortunately, the terminal still reports the same error if I set

> ENV[“PYTHON”]=“”

---

<div class="post-metadata">

### Author: ![JGranada](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jgranada/32/16076_2.png) [@JGranada](https://discourse.julialang.org/u/JGranada)
#### Post date: [July 1, 2020, 12:49am UTC](https://discourse.julialang.org/t/error-in-using-pyplot-in-juliapro/25400/13 "2020-07-01T00:49:43Z")

</div>

I had the same situation and I’ll share here my learnings. First of it all, I’m more in the “fans” side of Julia, (as opposite to expert) so my comments may not be expressed in pure wording.

Conceptually I believe PyPlot, with its core functionality available from Python get’s connected to Julia by using PyCall. When doing the typical Pkg.add(“PyPlot”) in Julia, Julia needs a way to re-build PyPlot and PyCall. The issue rises in PyCall, as that’s the one “talking” to the core functionalities of Matplotlib created in Python, so the build process needs Python. All troubles I has was related to the build process not being able to “find” Python in my machine. I tried Python 3.8 and I couldn’t make it work as the file where Python is installed gets a really restrictive access policy. The same does not happen to 3.7, so I moved back to 3.7. Once there I made sure the file where Phyton.exe is available where added to the Windows PATH. and in the ENV[“PYTHON”] =“python.exe”, as the rest for finding python is the the PATH System Variable. During the trial -error process with Python 3.8 , and enabling som debugging options prompted in the error mesagge it was clear the error was by not allowing Python.3.8.exe or the other required dlls to be accessed, and I couldn’t change that in my Windows (I as runing admin priv, but it was complettely locked).

Well…Once I adjusted to 3.7 , and the PATH and the ENV[“PYTHON”], the Pkg.build(“PyCall”)  
worked ok, but when tried to issue the “using PyPlot” a new error came up. In fact i had to re -instal matplotlib now in Python 3.7 by using the console and the "python -m pip install -U pip  
python -m pip install -U matplotlib "… There the PyPlot–\>PyCall–\>Matplotlib chain was complette and the package finally ran ok. I’m sure there sould be a way with Python 3.8, but I didn’t find it. Hope this helps
