# Precompile error with DataFrames

**URL:** <https://discourse.julialang.org/t/precompile-error-with-dataframes/68154>\
**Category:** Data\
**Created:** [September 14, 2021, 3:55pm UTC](https://discourse.julialang.org/t/precompile-error-with-dataframes/68154 "2021-09-14T15:55:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 14, 2021, 3:55pm UTC](https://discourse.julialang.org/t/precompile-error-with-dataframes/68154/1 "2021-09-14T15:55:08Z")

</div>

I started this post because of an issue with CSV, but now I have a precompile error with DataFrames. It installs ok, but when I try using it, I get

```julia
\u250c Info: Precompiling DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]
\u2514 @ Base loading.jl:1342
ERROR: LoadError: LoadError: UndefVarError: tostr_sizehint not defined
Stacktrace:
  [1] getproperty(x::Module, f::Symbol)
    @ Base ./Base.jl:26
  [2] top-level scope
    @ ~/.julia/packages/CategoricalArrays/qcwgl/src/deprecated.jl:101
  [3] include(mod::Module, _path::String)
    @ Base ./Base.jl:386
  [4] include(x::String)
    @ CategoricalArrays ~/.julia/packages/CategoricalArrays/qcwgl/src/CategoricalArrays.jl:1
  [5] top-level scope
    @ ~/.julia/packages/CategoricalArrays/qcwgl/src/CategoricalArrays.jl:39
  [6] include
    @ ./Base.jl:386 [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::String)
    @ Base ./loading.jl:1235
  [8] top-level scope
    @ none:1
  [9] eval
    @ ./boot.jl:360 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [11] top-level scope
    @ none:1
in expression starting at /home/davide/.julia/packages/CategoricalArrays/qcwgl/src/deprecated.jl:101
in expression starting at /home/davide/.julia/packages/CategoricalArrays/qcwgl/src/CategoricalArrays.jl:1
ERROR: LoadError: Failed to precompile CategoricalArrays [324d7699-5711-5eae-9e2f-1d82baa6b597] to /home/davide/.julia/compiled/v1.6/CategoricalArrays/jl_bVsqXg.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IOContext{Base.PipeEndpoint}, internal_stdout::IOContext{Base.PipeEndpoint}, 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
  [7] include
    @ ./Base.jl:386 [inlined]
  [8] 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:1235
  [9] top-level scope
    @ none:1
 [10] eval
    @ ./boot.jl:360 [inlined]
 [11] eval(x::Expr)
    @ Base.MainInclude ./client.jl:446
 [12] top-level scope
    @ none:1
in expression starting at /home/davide/.julia/packages/DataFrames/yH0f6/src/DataFrames.jl:1

Failed to precompile DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0] to /home/davide/.julia/compiled/v1.6/DataFrames/jl_oSVuVE.

Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IJulia.IJuliaStdio{Base.PipeEndpoint}, internal_stdout::IJulia.IJuliaStdio{Base.PipeEndpoint}, 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
 [7] eval
   @ ./boot.jl:360 [inlined]
 [8] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
   @ Base ./loading.jl:1116

```

What a mess! CSV and DataFrames are so basic!!

Thanks for any hints. From reading, I think this is because I had to downgrade something to get CSV running (!)

---

<div class="post-metadata">

**Author:** ![pdeffebach](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pdeffebach/32/10320_2.png) [@pdeffebach](https://discourse.julialang.org/u/pdeffebach)\
**Post date:** [September 14, 2021, 3:58pm UTC](https://discourse.julialang.org/t/precompile-error-with-dataframes/68154/2 "2021-09-14T15:58:33Z")

</div>

Do both work if you try in a new project?

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 14, 2021, 4:09pm UTC](https://discourse.julialang.org/t/precompile-error-with-dataframes/68154/3 "2021-09-14T16:09:09Z")

</div>

Thanks for the suggestion, but I get the same error

I guess I have to go back to 1.5

---

<div class="post-metadata">

**Author:** ![mbauman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mbauman/32/31082_2.png) [@mbauman](https://discourse.julialang.org/u/mbauman)\
**Post date:** [September 14, 2021, 4:35pm UTC](https://discourse.julialang.org/t/precompile-error-with-dataframes/68154/4 "2021-09-14T16:35:23Z")

</div>

What does Pkg.status() report? Does it persist through Julia restarts? Or if in a Jupyter notebook — does it persist through kernel restarts?

This appears to be due to a package downgrade. A new project should indeed fix it.

---

<div class="post-metadata">

**Author:** ![jbrea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbrea/32/3879_2.png) [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Post date:** [September 14, 2021, 4:36pm UTC](https://discourse.julialang.org/t/precompile-error-with-dataframes/68154/5 "2021-09-14T16:36:52Z")

</div>

> [@Issues with CSV in Julia 1.6.2](https://discourse.julialang.org/t/issues-with-csv-in-julia-1-6-2/67507/34):
>
> From reading, I think this is because I had to downgrade something to get CSV running

CSV.jl was recently updated; the new version works with the new Parsers version. I guess you could revert now pinning the package Parsers (`] free Parsers`).

On my machine everything works with

```julia
using Pkg
Pkg.activate(temp = true)
Pkg.add(["CSV", "DataFrames", "IJulia"])
using IJulia, CSV, DataFrames

```

---

<div class="post-metadata">

**Author:** ![compleat](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/compleat/32/8958_2.png) [@compleat](https://discourse.julialang.org/u/compleat)\
**Post date:** [September 14, 2021, 4:39pm UTC](https://discourse.julialang.org/t/precompile-error-with-dataframes/68154/6 "2021-09-14T16:39:11Z")

</div>

Hi. That’s great, thanks (and thanks for whoever fixed CSV!)  
What is the easiest way to uninstall everything from an environment (e.g. the default one) and start over?

---

<div class="post-metadata">

**Author:** ![jbrea](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jbrea/32/3879_2.png) [@jbrea](https://discourse.julialang.org/u/jbrea)\
**Post date:** [September 14, 2021, 4:52pm UTC](https://discourse.julialang.org/t/precompile-error-with-dataframes/68154/7 "2021-09-14T16:52:45Z")

</div>

> [@compleat](#):
>
> What is the easiest way to uninstall everything from an environment (e.g. the default one) and start over?

Don’t know what the easiest is, but I guess you could open the Project.toml file and remove all [deps] (or delete the Project.toml and Manifest.toml entirely) or you could run `Pkg.rm(collect(keys(Pkg.installed())))`.
