# UndefVarError: HierarchicalClustering not defined

**URL:** https://discourse.julialang.org/t/undefvarerror-hierarchicalclustering-not-defined/97767
**Category:** General Usage
**Created:** [April 22, 2023, 12:34am UTC](https://discourse.julialang.org/t/undefvarerror-hierarchicalclustering-not-defined/97767 "2023-04-22T00:34:02Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![OmarElrefaei](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/omarelrefaei/32/43002_2.png) [@OmarElrefaei](https://discourse.julialang.org/u/OmarElrefaei)
#### Post date: [April 22, 2023, 3:35am UTC](https://discourse.julialang.org/t/undefvarerror-hierarchicalclustering-not-defined/97767/3 "2023-04-22T03:35:43Z")

</div>

Hi @Selly_Shivute, welcome to our discourse.

from a cursory look it seems that there is no module called `HierarchicalClustering`.  
The documentation for `Clustering.jl` only mentions an [`hclust` function](https://juliastats.org/Clustering.jl/stable/hclust.html), but I can’t find anything named `HierarchicalClustering`.  
So try just `using Clustering` in the first line, that might be all you need.

* * *

Note: check out the pinned post: [(make it easier to help you)](https://discourse.julialang.org/t/please-read-make-it-easier-to-help-you/14757)  
Particularly numbers 2 and 4. It would be much easier to offer help if your code is a _self-contained_ example that looks like this:

```julia
# Normalize the matrix along its rows
X_norma = transpose(normalize(transpose(wine)))
# Define the distance metric to use
dist_metric = Euclidean()

```

_self-contained_ meaning that all everything is previously defined: for example here I’m not sure what kind of variable `wine` is supposed to be, and I get `Euclidean is not defined` because I don’t know which package it comes from.

---

_[View the full topic](https://discourse.julialang.org/t/undefvarerror-hierarchicalclustering-not-defined/97767)._
