Incompatibitly with latest versions of DataFrames and CSV

I seem to be stuck in a cycle, trying to install the latest versions of DataFrames and CSV.

Can anyone suggest a way out, or how to further diagnose the issue?

(v1.4) pkg> add DataFrames@0.21
  Resolving package versions...
   Updating `D:\...\environments\v1.4\Project.toml`
  [336ed68f] ↓ CSV v0.5.26 ⇒ v0.3.1
  [a93c6f00] ↑ DataFrames v0.20.2 ⇒ v0.21.0
   Updating `D:\...\Julia\environments\v1.4\Manifest.toml`
  [336ed68f] ↓ CSV v0.5.26 ⇒ v0.3.1
  [324d7699] ↑ CategoricalArrays v0.7.7 ⇒ v0.8.0
  [a93c6f00] ↑ DataFrames v0.20.2 ⇒ v0.21.0
  [9a8bc11e] + DataStreams v0.4.2
  [48062228] - FilePathsBase v0.7.0
  [7d512f48] + InternedStrings v0.7.0
  [ea10d353] ↓ WeakRefStrings v0.6.2 ⇒ v0.5.8

(v1.4) pkg> add CSV@0.5
  Resolving package versions...
   Updating `D:\...\Julia\environments\v1.4\Project.toml`
  [336ed68f] ↑ CSV v0.3.1 ⇒ v0.5.26
  [a93c6f00] ↓ DataFrames v0.21.0 ⇒ v0.20.2
   Updating `D:\...\Julia\environments\v1.4\Manifest.toml`
  [336ed68f] ↑ CSV v0.3.1 ⇒ v0.5.26
  [324d7699] ↓ CategoricalArrays v0.8.0 ⇒ v0.7.7
  [a93c6f00] ↓ DataFrames v0.21.0 ⇒ v0.20.2
  [9a8bc11e] - DataStreams v0.4.2
  [48062228] + FilePathsBase v0.7.0
  [7d512f48] - InternedStrings v0.7.0
  [ea10d353] ↑ WeakRefStrings v0.5.8 ⇒ v0.6.2

When these things happen and I really want to have the latest version of each package, I open different environments for each. Not an ideal solution, but it works. So, in my case, ODBC.jl and DataFrames 0.21 are not compatible right now, so I have a Julia_Projects/ODBC and a Julia_Projects/DataFrames folders, I go to the first one, ] activate . and ] add ODBC. I get whatever I need from the database in this case and my DataFrames version on this projects is 0.20.2 I can the go to the DataFrames folder and ] activate . this new environment and ] add DataFrames. In this new clean environment, DataFrames will be v0.21.

So, again, not ideal and packages will catch up to DataFrames with time, but for now it’s a working solution.

OK thanks.
I can work around for now.
So I guess you’re saying it’s known that latest versions of DataFrames and CSV are incompatible, and not something peculiar to my setup?

Yes, packages have [compat] boundaries that developers establish to guarantee compatible versions and those create those problems. You’ll find cases like frequently, most things get resolved fairly quickly, but sometimes it can take a while. At the same time, I’m getting into the habit of working with environments, creating folders and activating them for almost everything I do in Julia. It’s a little more work, but I like to keep up to date with certain packages, like DataFrames.

I know there are some other possible solution removing the [compat] boundaries from the package, but I’ve never done that in the past.

CSV.jl is at 0.6.2 currently and compatible with DataFrames 0.21: https://github.com/JuliaData/CSV.jl/blob/master/Project.toml

Your problem above is that you’re trying to force the latest DataFrames (0.21) to work with an outdated CSV version (0.5)

1 Like

Thanks!

I was on the wrong track because CSV was held back to v0.5.26.
Trying to add CSV@v0.6 gave some extra clues.
Seems XKCD was the culprit, indirectly holding back CSV.
I removed XKCD and all good now.

(v1.4) pkg> add CSV@0.6
  Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JSON3 [0f8b85d8]:
 JSON3 [0f8b85d8] log:
 ├─possible versions are: [0.1.0-0.1.8, 0.1.10-0.1.13, 1.0.0-1.0.2] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0-0.1.8, 0.1.10-0.1.13, 1.0.0-1.0.2]
 ├─restricted by compatibility requirements with XKCD [4bc7fa8b] to versions: [0.1.0-0.1.8, 0.1.10-0.1.13]
 │ └─XKCD [4bc7fa8b] log:
 │   ├─possible versions are: [0.1.0, 0.2.0] or uninstalled
 │   └─restricted to versions * by an explicit requirement, leaving only versions [0.1.0, 0.2.0]
 └─restricted by compatibility requirements with Parsers [69de0a69] to versions: 1.0.2 or uninstalled — no versions left
   └─Parsers [69de0a69] log:
     ├─possible versions are: [0.1.0, 0.2.0-0.2.5, 0.2.7-0.2.16, 0.2.18, 0.2.20, 0.2.22, 0.3.0-0.3.12, 1.0.0-1.0.3] or uninstalled
     ├─restricted to versions * by an explicit requirement, leaving only versions [0.1.0, 0.2.0-0.2.5, 0.2.7-0.2.16, 0.2.18, 0.2.20, 0.2.22, 0.3.0-0.3.12, 1.0.0-1.0.3]
     ├─restricted by compatibility requirements with JSON3 [0f8b85d8] to versions: [0.3.0-0.3.12, 1.0.0-1.0.3]
     │ └─JSON3 [0f8b85d8] log: see above
     └─restricted by compatibility requirements with CSV [336ed68f] to versions: 1.0.0-1.0.3
       └─CSV [336ed68f] log:
         ├─possible versions are: [0.3.0-0.3.1, 0.4.0-0.4.3, 0.5.0-0.5.26, 0.6.0-0.6.2] or uninstalled
         └─restricted to versions 0.6 by an explicit requirement, leaving only versions 0.6.0-0.6.2
2 Likes