# Failed to Precompile Plots due to LoadError

**URL:** <https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-loaderror/34450>\
**Category:** New to Julia\
**Tags:** plotting\
**Created:** [February 11, 2020, 2:27am UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-loaderror/34450 "2020-02-11T02:27:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Cardoso](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daniel_cardoso/32/11078_2.png) [@Daniel\_Cardoso](https://discourse.julialang.org/u/Daniel_Cardoso)\
**Post date:** [February 11, 2020, 2:27am UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-loaderror/34450/1 "2020-02-11T02:27:45Z")

</div>

Every time I try to use the Plots package( simply by writing “using Plots”) it gives me this error:

┌ Info: Precompiling Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80]  
└ @ Base loading.jl:1273  
ERROR: LoadError: syntax: invalid character “” near column 1  
Stacktrace:  
[1] top-level scope at C:\Users\Daniel.julia\packages\StatsBase\DyWPR\src\StatsBase.jl:1  
[2] include at .\boot.jl:328 [inlined]  
[3] include\_relative(::Module, ::String) at .\loading.jl:1105  
[4] include(::Module, ::String) at .\Base.jl:31  
[5] top-level scope at none:2  
[6] eval at .\boot.jl:330 [inlined]  
[7] eval(::Expr) at .\client.jl:425  
[8] top-level scope at .\none:3  
in expression starting at C:\Users\Daniel.julia\packages\StatsBase\DyWPR\src\StatsBase.jl:1  
ERROR: LoadError: Failed to precompile StatsBase [2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91] to C:\Users\Daniel.julia\compiled\v1.3\StatsBase\EZjIG\_RTdTZ.ji.  
Stacktrace:  
[1] error(::String) at .\error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283  
[3] \_require(::Base.PkgId) at .\loading.jl:1024  
[4] require(::Base.PkgId) at .\loading.jl:922  
[5] require(::Module, ::Symbol) at .\loading.jl:917  
[6] include at .\boot.jl:328 [inlined]  
[7] include\_relative(::Module, ::String) at .\loading.jl:1105  
[8] include(::Module, ::String) at .\Base.jl:31  
[9] top-level scope at none:2  
[10] eval at .\boot.jl:330 [inlined]  
[11] eval(::Expr) at .\client.jl:425  
[12] top-level scope at .\none:3  
in expression starting at C:\Users\Daniel.julia\packages\Plots\12uaJ\src\Plots.jl:19

I’m new to Julia and I don’t know what to do. I’m using Windows 8.1 64 bits

---

<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:** [February 11, 2020, 7:57am UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-loaderror/34450/2 "2020-02-11T07:57:00Z")

</div>

Which version of Julia are you using?

Is it possible that you accidentally modified the file `C:\Users\Daniel.julia\packages\StatsBase\DyWPR\src\StatsBase.jl`?

---

<div class="post-metadata">

**Author:** ![Daniel\_Cardoso](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daniel_cardoso/32/11078_2.png) [@Daniel\_Cardoso](https://discourse.julialang.org/u/Daniel_Cardoso)\
**Post date:** [February 11, 2020, 1:13pm UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-loaderror/34450/3 "2020-02-11T13:13:02Z")

</div>

I’m using Julia 1.3.1, i’v never even opened the StatsBase file, so I don’t think i’ve changed it.  
T-T

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [February 11, 2020, 1:25pm UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-loaderror/34450/4 "2020-02-11T13:25:03Z")

</div>

> [@Daniel\_Cardoso](#):
>
> C:\Users\Daniel.julia\packages\StatsBase

Try delete `C:\Users\Daniel.julia\packages\StatsBase` anyway and then run `import Pkg; Pkg.instantiate()` in Julia.

---

<div class="post-metadata">

**Author:** ![Daniel\_Cardoso](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daniel_cardoso/32/11078_2.png) [@Daniel\_Cardoso](https://discourse.julialang.org/u/Daniel_Cardoso)\
**Post date:** [February 11, 2020, 1:47pm UTC](https://discourse.julialang.org/t/failed-to-precompile-plots-due-to-loaderror/34450/5 "2020-02-11T13:47:18Z")

</div>

I went to the package pasta and discovered that the StatsBase file was all blank for some reason and add the package once again and it seams to be working, but now i’m strugling to deal with my pyplot.  
I use:  
using Plots  
pyplot()

and get this error:  
┌ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]  
└ @ Base loading.jl:1273  
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\Daniel.julia\packages\PyCall\ttONZ\src\startup.jl:44  
[3] include at .\boot.jl:328 [inlined]  
[4] include\_relative(::Module, ::String) at .\loading.jl:1105  
[5] include at .\Base.jl:31 [inlined]  
[6] include(::String) at C:\Users\Daniel.julia\packages\PyCall\ttONZ\src\PyCall.jl:1  
[7] top-level scope at C:\Users\Daniel.julia\packages\PyCall\ttONZ\src\PyCall.jl:41  
[8] include at .\boot.jl:328 [inlined]  
[9] include\_relative(::Module, ::String) at .\loading.jl:1105  
[10] include(::Module, ::String) at .\Base.jl:31  
[11] top-level scope at none:2  
[12] eval at .\boot.jl:330 [inlined]  
[13] eval(::Expr) at .\client.jl:425  
[14] top-level scope at .\none:3  
in expression starting at C:\Users\Daniel.julia\packages\PyCall\ttONZ\src\startup.jl:41  
in expression starting at C:\Users\Daniel.julia\packages\PyCall\ttONZ\src\PyCall.jl:41  
ERROR: LoadError: Failed to precompile PyCall [438e738f-606a-5dbb-bf0a-cddfbfd45ab0] to C:\Users\Daniel.julia\compiled\v1.3\PyCall\GkzkC\_RTdTZ.ji.  
Stacktrace:  
[1] error(::String) at .\error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283  
[3] \_require(::Base.PkgId) at .\loading.jl:1024  
[4] require(::Base.PkgId) at .\loading.jl:922  
[5] require(::Module, ::Symbol) at .\loading.jl:917  
[6] include at .\boot.jl:328 [inlined]  
[7] include\_relative(::Module, ::String) at .\loading.jl:1105  
[8] include(::Module, ::String) at .\Base.jl:31  
[9] top-level scope at none:2  
[10] eval at .\boot.jl:330 [inlined]  
[11] eval(::Expr) at .\client.jl:425  
[12] top-level scope at .\none:3  
in expression starting at C:\Users\Daniel.julia\packages\PyPlot\4wzW1\src\PyPlot.jl:4  
Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to C:\Users\Daniel.julia\compiled\v1.3\PyPlot\oatAj\_RTdTZ.ji.

Stacktrace:  
[1] error(::String) at .\error.jl:33  
[2] compilecache(::Base.PkgId, ::String) at .\loading.jl:1283  
[3] \_require(::Base.PkgId) at .\loading.jl:1024  
[4] require(::Base.PkgId) at .\loading.jl:922  
[5] require(::Module, ::Symbol) at .\loading.jl:917  
[6] top-level scope at C:\Users\Daniel.julia\packages\Plots\12uaJ\src\backends.jl:488  
[7] eval at .\boot.jl:330 [inlined]  
[8] \_initialize\_backend(::Plots.PyPlotBackend) at C:\Users\Daniel.julia\packages\Plots\12uaJ\src\backends.jl:487  
[9] backend(::Plots.PyPlotBackend) at C:\Users\Daniel.julia\packages\Plots\12uaJ\src\backends.jl:176  
[10] #pyplot#278 at C:\Users\Daniel.julia\packages\Plots\12uaJ\src\backends.jl:33 [inlined]  
[11] pyplot() at C:\Users\Daniel.julia\packages\Plots\12uaJ\src\backends.jl:33  
[12] top-level scope at In[33]:1

when I try to: Pkg.build(“PyCall”), i get this:

┌ 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”).  
│ [ Info: Downloading miniconda installer …  
│ ERROR: LoadError: failed process: Process(`'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -Version 3 -NoProfile -Command "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; (New-Object System.Net.Webclient).DownloadFile('https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Windows-x86_64.exe', 'C:\Users\Daniel\.julia\conda\3\installer.exe')"`, ProcessExited(2845775364)) [2845775364]  
│  
│ Stacktrace:  
│ [1] pipeline\_error at .\process.jl:525 [inlined]  
│ [2] download\_powershell(::String, ::String) at .\download.jl:20  
│ [3] download at .\download.jl:64 [inlined]  
│ [4] \_install\_conda(::String, ::Bool) at C:\Users\Daniel.julia\packages\Conda\OIHWB\src\Conda.jl:171  
│ [5] \_install\_conda(::String) at C:\Users\Daniel.julia\packages\Conda\OIHWB\src\Conda.jl:162  
│ [6] runconda(::Cmd, ::String) at C:\Users\Daniel.julia\packages\Conda\OIHWB\src\Conda.jl:112  
│ [7] #add#1(::String, ::typeof(Conda.add), ::String, ::String) at C:\Users\Daniel.julia\packages\Conda\OIHWB\src\Conda.jl:195  
│ [8] add at C:\Users\Daniel.julia\packages\Conda\OIHWB\src\Conda.jl:194 [inlined] (repeats 2 times)  
│ [9] top-level scope at C:\Users\Daniel.julia\packages\PyCall\ttONZ\deps\build.jl:84  
│ [10] include at .\boot.jl:328 [inlined]  
│ [11] include\_relative(::Module, ::String) at .\loading.jl:1105  
│ [12] include(::Module, ::String) at .\Base.jl:31  
│ [13] include(::String) at .\client.jl:424  
│ [14] top-level scope at none:5  
│ in expression starting at C:\Users\Daniel.julia\packages\PyCall\ttONZ\deps\build.jl:43  
└ @ Pkg.Operations D:\buildbot\worker\package\_win64\build\usr\share\julia\stdlib\v1.3\Pkg\src\backwards\_compatible\_isolation.jl:649
