-
Notifications
You must be signed in to change notification settings - Fork 119
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
WARNING: both StatsBase and Distances export "pairwise!"; uses of it in module Clustering must be qualified #274
Comments
@jiahao @pluskid @johnmyleswhite @devmotion
which is bad practice for a package, it should specifically import individual functions they want, not implicitly import all names in those modules. That's what is causing this problem. The issue won't be fixed without editing Clustering.jl. |
@alifarhat40 This issue was resolved quite some time ago (see e.g. #235) -- both StatsBase.jl and Distances.jl packages import StatsAPI.jl, and pairwise() is defined there. |
Status |
I tired ]up but still get the same error. Status |
Thanks. That's the packages that you depend on directly. Can you check which version of the Distances.jl is in your Manifest.toml? |
[[deps.Distances]] |
How can I resolve compatibility constraints? Any tutorial I can follow? I am new to Julia. Thanks. |
Unfortunately, I am not aware of a nice tutorial. You can start with what Julia suggests, i.e. running Just as a sanity check -- check that your Project.toml does not contain explicit version constraints, and that you are not using some specific branches or development versions of the packages that were not updated for a while (in Manifest.toml you would see that the entry for such package contains Another thing, it looks like you are using Julia 1.8. The current one is 1.10, and I suspect many packages have switched to 1.9+, in particular because v1.9 had introduced package extensions. |
Upgrading Julia on Windows is also a mess. No clear instructions on how to do that either. I tried several instructions. No luck. |
juliaup is working quite nicely to me also on windows. the only inconvenience is that you are using julia version-specific project environment, you would have to replicate it for the new version. you may want to consider switching to an environment in a specific folder (see activate command). |
Hello, I am trying to run the code here using the same example:
I was told to post an issue here as it might be an issue with Clustering.jl.
https://github.com/niclaspopp/MultivariateDiscretization.jl/blob/master/MultivariateDiscretization/Doc%20v0.1.0.ipynb
However, I get the following error:
`ipd = greedy_IPD(Testdata,dims,35)
`WARNING: both StatsBase and Distances export "pairwise"; uses of it in module Clustering must be qualified
WARNING: both StatsBase and Distances export "pairwise!"; uses of it in module Clustering must be qualified
UndefVarError: pairwise not defined
Stacktrace:
[1] _kmeans!(X::Adjoint{Float64, Vector{Float64}}, weights::Nothing, centers::Matrix{Float64}, maxiter::Int64, tol::Float64, displevel::Int64, distance::Distances.SqEuclidean, rng::Random._GLOBAL_RNG)
@ Clustering C:\Users\alifa.julia\packages\Clustering\lI5MF\src\kmeans.jl:141
[2] kmeans!(X::Adjoint{Float64, Vector{Float64}}, centers::Matrix{Float64}; weights::Nothing, maxiter::Int64, tol::Float64, display::Symbol, distance::Distances.SqEuclidean, rng::Random._GLOBAL_RNG)
@ Clustering C:\Users\alifa.julia\packages\Clustering\lI5MF\src\kmeans.jl:71
[3] kmeans(X::Adjoint{Float64, Vector{Float64}}, k::Int64; weights::Nothing, init::Symbol, maxiter::Int64, tol::Float64, display::Symbol, distance::Distances.SqEuclidean, rng::Random._GLOBAL_RNG)
@ Clustering C:\Users\alifa.julia\packages\Clustering\lI5MF\src\kmeans.jl:114
[4] kmeans(X::Adjoint{Float64, Vector{Float64}}, k::Int64)
@ Clustering C:\Users\alifa.julia\packages\Clustering\lI5MF\src\kmeans.jl:95
[5] greedy_IPD(M::Matrix{Float64}, ndim::Int64, T::Int64, disc::Symbol, skip::Vector{Any}, limit::Int64)
@ MultivariateDiscretization C:\Users\alifa.julia\packages\MultivariateDiscretization\D0sKt\src\IPD.jl:225
[6] greedy_IPD(M::Matrix{Float64}, ndim::Int64, T::Int64)
@ MultivariateDiscretization C:\Users\alifa.julia\packages\MultivariateDiscretization\D0sKt\src\IPD.jl:188
[7] top-level scope
@ In[4]:1
The text was updated successfully, but these errors were encountered: