Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with version of CategoricalArrays #1

Closed
mjherold opened this issue May 10, 2020 · 4 comments
Closed

Incompatibility with version of CategoricalArrays #1

mjherold opened this issue May 10, 2020 · 4 comments

Comments

@mjherold
Copy link

mjherold commented May 10, 2020

There seems to be some conflict with the version of CategoricalArrays listed in the Manifest.toml. I can load DataFrames in the Julia REPL, but when I try to run the Julia notebook First steps with data frames.ipynb I get a conflict with CategoricalArrays after using DataFrames.

┌ Info: Precompiling DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]
└ @ Base loading.jl:1260
ERROR: LoadError: ArgumentError: Package CategoricalArrays does not have Compat in its dependencies:
- If you have CategoricalArrays checked out for development and have
  added Compat as a dependency but haven't updated your primary
  environment's manifest file, try `Pkg.resolve()`.
- Otherwise you may need to report an issue with CategoricalArrays
Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:905
 [2] include(::Module, ::String) at ./Base.jl:377
 [3] top-level scope at none:2
 [4] eval at ./boot.jl:331 [inlined]
 [5] eval(::Expr) at ./client.jl:449
 [6] top-level scope at ./none:3
in expression starting at /Users/user888/.julia/packages/CategoricalArrays/dmrjI/src/CategoricalArrays.jl:11
ERROR: LoadError: Failed to precompile CategoricalArrays [324d7699-5711-5eae-9e2f-1d82baa6b597] to /Users/user888/.julia/compiled/v1.4/CategoricalArrays/RHXoP_Ek050.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922
 [6] include(::Module, ::String) at ./Base.jl:377
 [7] top-level scope at none:2
 [8] eval at ./boot.jl:331 [inlined]
 [9] eval(::Expr) at ./client.jl:449
 [10] top-level scope at ./none:3
in expression starting at /Users/user888/.julia/packages/DataFrames/S3ZFo/src/DataFrames.jl:5
Failed to precompile DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0] to /Users/mj847/.julia/compiled/v1.4/DataFrames/AR9oZ_Ek050.ji.

Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1272
 [3] _require(::Base.PkgId) at ./loading.jl:1029
 [4] require(::Base.PkgId) at ./loading.jl:927
 [5] require(::Module, ::Symbol) at ./loading.jl:922
 [6] top-level scope at In[1]:1

Tested with following package versions

Status `~/.julia/environments/v1.4/Project.toml`
  [c52e3926] Atom v0.12.10
  [324d7699] CategoricalArrays v0.7.7
  [35d6a980] ColorSchemes v3.9.0
  [5ae59095] Colors v0.12.0
  [f65535da] Convex v0.13.3
  [a93c6f00] DataFrames v0.20.2
  [31c24e10] Distributions v0.22.6
  [2fe49d83] Expectations v1.4.0
  [f6369f11] ForwardDiff v0.10.10
  [38e38edf] GLM v1.3.9
  [60bf3e95] GLPK v0.13.0
  [ea4f424c] Gen v0.3.2 #master (https://github.com/probcomp/Gen)
  [7073ff75] IJulia v1.21.2
  [c601a237] Interact v0.10.3
  [b6b21f68] Ipopt v0.6.1
  [c8e1da08] IterTools v1.3.0
  [42fd0dbc] IterativeSolvers v0.8.4
  [4076af6c] JuMP v0.21.2
  [e5e0dc1b] Juno v0.8.1
  [ba0b0d4f] Krylov v0.5.1
  [5c8ed15e] LinearOperators v1.1.0
  [2fda8390] LsqFit v0.10.0
  [6f286f6a] MultivariateStats v0.7.0
  [429524aa] Optim v0.21.0
  [1dea7af3] OrdinaryDiffEq v5.36.0
  [3b7a836e] PGFPlots v3.2.1
  [91a5bcdd] Plots v1.2.3
  [f27b6e38] Polynomials v1.0.4 #master (https://github.com/JuliaMath/Polynomials.jl.git)
  [140ffc9f] ProximalAlgorithms v0.3.1
  [a725b495] ProximalOperators v0.10.3
  [6f49c342] RCall v0.13.6
  [c946c3f1] SCS v0.6.6
  [682df890] Stan v6.0.4
  [c1514b29] StanSample v2.1.3
  [2913bbd2] StatsBase v0.32.2
  [c751599d] ToeplitzMatrices v0.6.1
  [0f1e0344] WebIO v0.8.13 #master (https://github.com/JuliaGizmos/WebIO.jl)
@logankilpatrick
Copy link
Member

Hm, I just tried running this and was unable to replicate the issue. Perhaps the issue is that you are not running the notebook with the correct Manifest and Project files?

My Pkg.status() does not give me as many entries as this and it should be using the Manifest and Project files from this repo not the main ones in your julia folder which it seems to be pointing to.

@logankilpatrick
Copy link
Member

I would make sure you cd() into the correct folder. CC @bkamins We should point people to download the entire repo here right?

@bkamins
Copy link
Contributor

bkamins commented May 11, 2020

Yes - you should download the whole repository and run it from the folder where you have downloaded the files.

This is exactly the purpose of running https://github.com/JuliaAcademy/DataFrames/blob/master/1.%20Environment%20setup.ipynb part to make sure that you have the proper environment set up. You should get the output exactly as shown there.

Now regarding your output note that you have:

  • DataFrames.jl version 0.20.2
  • you do not have CSV.jl installed
  • you have not activated the project environment, but rather you are using the default environment

If you check the Manifest.toml in the repository of the tutorial you will see that in particular:

  • DataFrames.jl is required to be in 0.21 version
  • CSV.jl needs to be installed in 0.6.2 version

Note that if you are in the correct directory Jupyter Notebook will automatically use Project.toml and Manifest.toml files I have shared. I also have recently written up a small post explaining how to make Julia REPL to do the same here: https://bkamins.github.io/julialang/2020/05/10/julia-project-environments.html.

@mjherold
Copy link
Author

I had changed to the directory with the data-frame tutorials, but I can no longer reproduce the problem. Everything seems to run fine now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants