# Precompiling CSV.jl fails

**URL:** <https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103>\
**Category:** General Usage\
**Tags:** package, error, csv\
**Created:** [January 24, 2022, 5:46am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103 "2022-01-24T05:46:03Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![mindaslab](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mindaslab/32/12673_2.png) [@mindaslab](https://discourse.julialang.org/u/mindaslab)\
**Post date:** [January 24, 2022, 5:46am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/1 "2022-01-24T05:46:03Z")

</div>

Hello All,

I am running **Julia 1.7.1** on **MacOS Monterey 12.1** , I to use CSV by running the command `using CSV` and I got this:

```julia
┌ Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
└ @ Base loading.jl:1423
ERROR: LoadError: MethodError: no method matching Parsers.Options(::Missing, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::UInt8, ::Vector{String}, ::Vector{String}, ::Nothing, ::Bool, ::Bool, ::Nothing, ::Bool, ::Bool, ::Bool)
Closest candidates are:
  Parsers.Options(::Union{Missing, Nothing, Vector{String}}, ::Union{Char, UInt8}, ::Union{Char, UInt8}, ::Union{Char, UInt8}, ::Union{Char, UInt8}, ::Union{Char, UInt8}, ::Union{Nothing, Char, UInt8, String}, ::Union{Char, UInt8}, ::Union{Nothing, Vector{String}}, ::Union{Nothing, Vector{String}}, ::Union{Nothing, String, Parsers.Format, Dates.DateFormat}, ::Any, ::Any, ::Any, ::Any, ::Any) at ~/.julia/packages/Parsers/a3jNK/src/Parsers.jl:81
  Parsers.Options(::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any, ::Any) at ~/.julia/packages/Parsers/a3jNK/src/Parsers.jl:59
  Parsers.Options(::Vector{String}, ::Union{Missing, Nothing, Vector{Tuple{Ptr{UInt8}, Int64}}}, ::Bool, ::Bool, ::UInt8, ::UInt8, ::Bool, ::UInt8, ::UInt8, ::UInt8, ::Union{Nothing, Tuple{Ptr{UInt8}, Int64}, UInt8}, ::UInt8, ::Union{Nothing, Vector{Tuple{Ptr{UInt8}, Int64}}}, ::Union{Nothing, Vector{Tuple{Ptr{UInt8}, Int64}}}, ::Union{Nothing, Parsers.Format}, ::Union{Nothing, Tuple{Ptr{UInt8}, Int64}}) at ~/.julia/packages/Parsers/a3jNK/src/Parsers.jl:59
Stacktrace:
  [1] CSV.Context(source::CSV.Arg, header::CSV.Arg, normalizenames::CSV.Arg, datarow::CSV.Arg, skipto::CSV.Arg, footerskip::CSV.Arg, transpose::CSV.Arg, comment::CSV.Arg, ignoreemptyrows::CSV.Arg, ignoreemptylines::CSV.Arg, select::CSV.Arg, drop::CSV.Arg, limit::CSV.Arg, buffer_in_memory::CSV.Arg, threaded::CSV.Arg, ntasks::CSV.Arg, tasks::CSV.Arg, rows_to_check::CSV.Arg, lines_to_check::CSV.Arg, missingstrings::CSV.Arg, missingstring::CSV.Arg, delim::CSV.Arg, ignorerepeated::CSV.Arg, quoted::CSV.Arg, quotechar::CSV.Arg, openquotechar::CSV.Arg, closequotechar::CSV.Arg, escapechar::CSV.Arg, dateformat::CSV.Arg, dateformats::CSV.Arg, decimal::CSV.Arg, truestrings::CSV.Arg, falsestrings::CSV.Arg, stripwhitespace::CSV.Arg, type::CSV.Arg, types::CSV.Arg, typemap::CSV.Arg, pool::CSV.Arg, downcast::CSV.Arg, lazystrings::CSV.Arg, stringtype::CSV.Arg, strict::CSV.Arg, silencewarnings::CSV.Arg, maxwarnings::CSV.Arg, debug::CSV.Arg, parsingdebug::CSV.Arg, validate::CSV.Arg, streaming::CSV.Arg)
    @ CSV ~/.julia/packages/CSV/VjW8G/src/context.jl:366
  [2] CSV.Context(source::String; header::Int64, normalizenames::Bool, datarow::Int64, skipto::Int64, footerskip::Int64, transpose::Bool, comment::Nothing, ignoreemptyrows::Bool, ignoreemptylines::Nothing, select::Nothing, drop::Nothing, limit::Nothing, buffer_in_memory::Bool, threaded::Nothing, ntasks::Nothing, tasks::Nothing, rows_to_check::Int64, lines_to_check::Nothing, missingstrings::Vector{String}, missingstring::String, delim::Nothing, ignorerepeated::Bool, quoted::Bool, quotechar::Char, openquotechar::Nothing, closequotechar::Nothing, escapechar::Char, dateformat::Nothing, dateformats::Nothing, decimal::UInt8, truestrings::Vector{String}, falsestrings::Vector{String}, stripwhitespace::Bool, type::Nothing, types::Nothing, typemap::Dict{Type, Type}, pool::Tuple{Float64, Int64}, downcast::Bool, lazystrings::Bool, stringtype::Type{InlineStrings.InlineString}, strict::Bool, silencewarnings::Bool, maxwarnings::Int64, debug::Bool, parsingdebug::Bool, validate::Bool)
    @ CSV ~/.julia/packages/CSV/VjW8G/src/context.jl:178
  [3] CSV.Context(source::String)
    @ CSV ~/.julia/packages/CSV/VjW8G/src/context.jl:178
  [4] _precompile_()
    @ CSV ~/.julia/packages/CSV/VjW8G/src/precompile.jl:7
  [5] top-level scope
    @ ~/.julia/packages/CSV/VjW8G/src/CSV.jl:95
  [6] include
    @ ./Base.jl:418 [inlined]
  [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
  [8] top-level scope
    @ none:1
  [9] eval
    @ ./boot.jl:373 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [11] top-level scope
    @ none:1
in expression starting at /Users/mindaslab/.julia/packages/CSV/VjW8G/src/CSV.jl:1

Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to /Users/mindaslab/.julia/compiled/v1.7/CSV/jl_0iZKSa.

Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997
 [7] eval
   @ ./boot.jl:373 [inlined]
 [8] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base ./loading.jl:1196

```

I am unable to resolve it. It will be great if some one could throw light upon it.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [January 24, 2022, 6:13am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/2 "2022-01-24T06:13:02Z")

</div>

Probably just an old version, what’s the output of `] st` in the environment you’re trying this in?

---

<div class="post-metadata">

**Author:** ![mapi1](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mapi1/32/29237_2.png) [@mapi1](https://discourse.julialang.org/u/mapi1)\
**Post date:** [January 24, 2022, 8:28am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/3 "2022-01-24T08:28:08Z")

</div>

This should be solved, see Issue [#965](https://github.com/JuliaData/CSV.jl/issues/965). Try `] add CSV@v0.10.2` to get the latest version.

---

<div class="post-metadata">

**Author:** ![mindaslab](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mindaslab/32/12673_2.png) [@mindaslab](https://discourse.julialang.org/u/mindaslab)\
**Post date:** [January 24, 2022, 8:55am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/4 "2022-01-24T08:55:01Z")

</div>

I did `] up` in my Julia prompt and it seems to work. Thank you @nilshg and @mapi1 for helping me out.

---

<div class="post-metadata">

**Author:** ![HelgavonLichtenstein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgavonlichtenstein/32/5005_2.png) [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Post date:** [February 11, 2022, 11:17am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/5 "2022-02-11T11:17:30Z")

</div>

Hi,

I have the same issue with Julia 1.6 on Windows 10 but neither updating nor installing the latest version `CSV v0.10.2` fixes the issue. I have `Parsers v2.2.2`.

```julia
julia> using CSV
[Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
ERROR: Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to C:\Users\Helga\.julia\compiled\v1.6\CSV\jl_4FFC.tmp.
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::Base.TTY, internal_stdout::Base.TTY, ignore_loaded_modules::Bool)
   @ Base .\loading.jl:1385
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base .\loading.jl:1329
 [4] _require(pkg::Base.PkgId)
   @ Base .\loading.jl:1043
 [5] require(uuidkey::Base.PkgId)
   @ Base .\loading.jl:936
 [6] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:923

```

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 11, 2022, 11:21am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/6 "2022-02-11T11:21:57Z")

</div>

This doesn’t look like the same issue though, does it? The error message doesn’t mention parsers at all.

Are you running this in a fresh Julia session in the REPL? Can you show the output of `]st` and `versioninfo()`?

---

<div class="post-metadata">

**Author:** ![HelgavonLichtenstein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgavonlichtenstein/32/5005_2.png) [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Post date:** [February 11, 2022, 11:26am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/7 "2022-02-11T11:26:33Z")

</div>

Ah, `Parsers` was mentioned in [here](https://github.com/JuliaData/CSV.jl/issues/965) as a possible solution.

```julia
  [c52e3926] Atom v0.12.36
  [6e4b80f9] BenchmarkTools v1.3.0       
  [336ed68f] CSV v0.10.2
  [a93c6f00] DataFrames v1.3.2
  [0c46a032] DifferentialEquations v7.1.0
  [b4f34e82] Distances v0.10.7
  [31c24e10] Distributions v0.25.48      
  [033835bb] JLD2 v0.4.20
  [e5e0dc1b] Juno v0.8.4
  [093fc24a] LightGraphs v1.3.5
  [5fb14364] OhMyREPL v0.5.12
  [69de0a69] Parsers v2.2.1
  [91a5bcdd] Plots v1.25.8
  [f2b01f46] Roots v1.3.14
  [2913bbd2] StatsBase v0.33.14
  [f3b207a7] StatsPlots v0.14.33
  [c3572dad] Sundials v4.9.2
  [8bb1440f] DelimitedFiles
  [8ba89e20] Distributed
  [9abbd945] Profile    
  [9a3f8284] Random 

```

```julia
Julia Version 1.6.2
Commit 1b93d53fc4 (2021-07-14 15:36 UTC)       
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
  WORD_SIZE: 64    
  LIBM: libopenlibm
  LLVM: libLLVM-11.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = "C:\Users\Helga\AppData\Local\atom\app-1.59.0\atom.exe" -a
  JULIA_NUM_THREADS = 4

```

However, `CSV` just successfully precompiled after I changed `Parsers v2.2.2` to `Parsers v2.2.1`.

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 11, 2022, 11:35am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/8 "2022-02-11T11:35:44Z")

</div>

Again that issue is about errors which explicitly show Parsers erroring during precompilation, which your error did not. Your issue was likely unrelated, but glad to see it worked out now.

Just to be sure I just tried a fresh install of CSV 0.10.2 on both Julia 1.7.2 and 1.6.5 (Windows 10), both worked flawlessly, installing Parsers 2.2.2 as a dependency.

As an aside, there isn’t really any reason to use Julia 1.6.2, the current release is 1.7.2.

---

<div class="post-metadata">

**Author:** ![Eben60](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/eben60/32/13475_2.png) [@Eben60](https://discourse.julialang.org/u/Eben60)\
**Post date:** [February 11, 2022, 10:42pm UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/9 "2022-02-11T22:42:02Z")

</div>

The same issue, Julia 1.7.1 - Win10 as running Julia in the Atom’s REPL (also with package updates and restarts). However `using CSV` from a command line REPL solved the problem, and CSV now available in Atom too.

```julia
julia> using CSV
[Info: Precompiling CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b]
ERROR: Failed to precompile CSV [336ed68f-0bac-5ca0-87d4-7b16caf5d00b] to C:\Users\elk\.julia\compiled\v1.7\CSV\jl_7A89.tmp.
Stacktrace:
 [1] error(s::String)
   @ Base .\error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base .\loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base .\loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base .\loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base .\loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base .\loading.jl:997

```

```julia
(@v1.7) pkg> status
      Status `C:\Users\eben60\.julia\environments\v1.7\Project.toml`
  [c52e3926] Atom v0.12.36
  [6e4b80f9] BenchmarkTools v1.3.0
  [336ed68f] CSV v0.10.2
  [5ae59095] Colors v0.12.8
  [864edb3b] DataStructures v0.18.11
  [9fdde737] DiffEqOperators v4.40.0
  [0c46a032] DifferentialEquations v7.1.0
  [e30172f5] Documenter v0.26.3
  [ba3e091f] Encaps v0.1.1-beta.6 `https://github.com/Eben60/Encaps.jl#master`
  [a09fc81d] ImageCore v0.9.3
  [6218d12a] ImageMagick v1.2.2
  [916415d5] Images v0.25.1
  [0f8b85d8] JSON3 v1.9.2
  [e5e0dc1b] Juno v0.8.4
  [b45899a3] LVServer v0.3.0-beta.3 `C:\_MyOwnDocs\SoftwareDevelopment\LVServer.jl`
  [b964fa9f] LaTeXStrings v1.3.0
  [b5ef6335] LabVIEW0 v0.2.0-alpha.1 `C:\_MyOwnDocs\SoftwareDevelopment\LabVIEW0.jl#dev`
  [86f7a689] NamedArrays v0.9.6
  [e7bfaba1] NumericalIntegration v0.3.3
  [bac558e1] OrderedCollections v1.4.1
  [1dea7af3] OrdinaryDiffEq v6.6.6
  [d96e819e] Parameters v0.12.3
  [d254efa0] PkgSkeleton v0.4.0
  [eebad327] PkgVersion v0.1.1
  [91a5bcdd] Plots v1.25.9
  [27ebfcd6] Primes v0.5.1
  [189a3867] Reexport v1.2.2
  [295af30f] Revise v3.3.1
  [276daf66] SpecialFunctions v2.1.2
  [9672c7b4] SteadyStateDiffEq v1.6.6
  [24249f21] SymPy v1.1.4
  [bd369af6] Tables v1.6.1
  [5e47fb64] TestImages v1.6.2
  [3a884ed6] UnPack v1.0.2
  [1986cc42] Unitful v1.11.0
  [42071c24] UnitfulRecipes v1.5.3
  [c2297ded] ZMQ v1.2.1

```

```julia
julia> versioninfo()
Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
  JULIA_EDITOR = "C:\Users\eben60\AppData\Local\atom\app-1.59.0\atom.exe" -a
  JULIA_NUM_THREADS = 4

```

---

<div class="post-metadata">

**Author:** ![tt1234567](https://avatars.discourse-cdn.com/v4/letter/t/dec6dc/32.png) [@tt1234567](https://discourse.julialang.org/u/tt1234567)\
**Post date:** [February 12, 2022, 9:39am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/10 "2022-02-12T09:39:46Z")

</div>

I have the same issue with Windows 10, Julia 1.72 and VSCode. Opening a command line REPL and running `using CSV` solves the problem. It’s happened twice so far, yesterday and today, after running `]update` in VSCode.

---

<div class="post-metadata">

**Author:** ![Jorge\_Vieyra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jorge_vieyra/32/6527_2.png) [@Jorge\_Vieyra](https://discourse.julialang.org/u/Jorge_Vieyra)\
**Post date:** [February 17, 2022, 9:48am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/11 "2022-02-17T09:48:29Z")

</div>

Same thing here on Windows 10 and Julia 1.72, as well as for my colleague that was on Julia 1.6.1 and Win10.

In our case multiple `using CSV` (like 5 times) until worked fixed the problem. That is rather odd

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [February 17, 2022, 10:02am UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/12 "2022-02-17T10:02:47Z")

</div>

I’ve opened an issue about this (new, apparently non-Parsers related) precompilation failure here:

[https://github.com/JuliaData/CSV.jl/issues/981](https://github.com/JuliaData/CSV.jl/issues/981)

---

<div class="post-metadata">

**Author:** ![lwhitefox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lwhitefox/32/4363_2.png) [@lwhitefox](https://discourse.julialang.org/u/lwhitefox)\
**Post date:** [February 24, 2022, 10:34pm UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/13 "2022-02-24T22:34:55Z")

</div>

I can add my own experience with this issue (same output as reported by @Eben60) - I eventually got the precompile to work, but only after trying to precompile ~6 times in an external PowerShell, then opening a new PowerShell inside VS Code and doing precompile again.

I’m using Windows 10 and current Julia, CSV versions

---

<div class="post-metadata">

**Author:** ![sayed](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@sayed](https://discourse.julialang.org/u/sayed)\
**Post date:** [May 9, 2023, 11:58pm UTC](https://discourse.julialang.org/t/precompiling-csv-jl-fails/75103/14 "2023-05-09T23:58:45Z")

</div>

I had similar issue and previous solutions did not help. I then tried to install CSV package from github repository and found the error caused by incompatibility with another previously installed package:

Pkg.add(PackageSpec(url=“[https://github.com/JuliaData/CSV.jl",rev="main](https://github.com/JuliaData/CSV.jl%22,rev=%22main)”))  
Updating git-repo `https://github.com/JuliaData/CSV.jl`  
Updating registry at `~/.julia/registries/General.toml`  
Resolving package versions…  
ERROR: Unsatisfiable requirements detected for package CSV [336ed68f]:  
CSV [336ed68f] log:  
├─possible versions are: 0.10.10 or uninstalled  
├─CSV [336ed68f] is fixed to version 0.10.10  
└─found to have no compatible versions left with MCMCBenchmarks [72ce6e51]  
└─MCMCBenchmarks [72ce6e51] log:  
├─possible versions are: 0.0.1-0.7.2 or uninstalled  
└─restricted to versions \* by an explicit requirement, leaving only versions 0.0.1-0.7.2

Removing the incompatible package resolved the problem:  
Pkg.rm(“MCMCBenchmarks”)  
Pkg.resolve()
