Can't evaluate Pkg.add("RDatasets")

Hi all. I’m trying to work through the Julia for Data Science tutorial, and I’m working on going through Video 3 in JuliaPro 1.5.2-1.

I made a script to run the following commands, which worked last week:

cd("D:\\julia\\data_science_tutorial")

using Pkg
Pkg.add("StatsBase")
using Statistics
using StatsBase
Pkg.add("RDatasets")
using RDatasets
using Plots
Pkg.add("StatsPlots")
using StatsPlots
Pkg.add("KernelDensity")
using KernelDensity
Pkg.add("Distributions")
using Distributions
using LinearAlgebra
Pkg.add("HypothesisTests")
using HypothesisTests
Pkg.add("PyCall")
using PyCall
Pkg.add("MLBase")
using MLBase

I loaded JuliaPro today and tried to run this script and got the following error when it tried to evaluate the Pkg.add(“RDatasets”) line:

Error evaluating statistics.jl

LoadError: Unsatisfiable requirements detected for package TimeZones [f269a46b]:
 TimeZones [f269a46b] log:
 ├─TimeZones [f269a46b] has no known versions!
 └─found to have no compatible versions left with RData [df47a6cb] 
   └─RData [df47a6cb] log:
     ├─possible versions are: [0.5.0, 0.6.0-0.6.3, 0.7.0-0.7.2] or uninstalled
     └─restricted by compatibility requirements with RDatasets [ce6b1742] to versions: [0.5.0, 0.6.0-0.6.3, 0.7.0-0.7.2]
       └─RDatasets [ce6b1742] log:
         ├─possible versions are: [0.5.0, 0.6.0-0.6.10] or uninstalled
         └─restricted to versions * by an explicit requirement, leaving only versions [0.5.0, 0.6.0-0.6.10]
in expression starting at D:\julia\data_science_tutorial\statistics.jl:7
propagate_constraints!(::Pkg.Resolve.Graph, ::Set{Int64}; log_events::Bool) at graphtype.jl:1005
propagate_constraints! at graphtype.jl:946 [inlined]
propagate_constraints! at graphtype.jl:946 [inlined]
simplify_graph!(::Pkg.Resolve.Graph, ::Set{Int64}; clean_graph::Bool) at graphtype.jl:1460
simplify_graph! at graphtype.jl:1460 [inlined]
simplify_graph! at graphtype.jl:1460 [inlined]
resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at Operations.jl:375
targeted_resolve at Operations.jl:1114 [inlined]
tiered_resolve(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at Operations.jl:1100
_resolve at Operations.jl:1120 [inlined]
add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows) at Operations.jl:1135
add at Operations.jl:1127 [inlined]
add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Windows, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at API.jl:188
add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at API.jl:139
#add#21 at API.jl:67 [inlined]
add at API.jl:67 [inlined]
#add#20 at API.jl:66 [inlined]
add at API.jl:66 [inlined]
add(::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at API.jl:65
add(::String) at API.jl:65
top-level scope at statistics.jl:7
include_string(::Function, ::Module, ::String, ::String) at loading.jl:1088

Please, do you have any tips?

I’m using Windows 10.

maybe not use JuliaPro and just use Julia.

3 Likes

@jdietl : I think this a compatibility issue. Try the following:

First remove
Pkg.rm("RDatasets")

Then add specific versions mentioned in the error message

Pkg.add("RDatasets@v0.6.10")

Thanks!