This is only an issue with the conda installation. It is fixed on github.
Versions
Poppunk version 1.2.2
Scikit-learn version 1.2.2
Installationconda install poppunk
Command used and output returnedpoppunk --version
Output: ImportError
Describe the bug
Popunk.plot.py tries to import KernelDensity from scikit-learn with from sklearn.neighbors.kde import KernelDensity and runs into ImportError because KernelDensity in newer sklearn now lives at sklearn.neighbors.KernelDensity
Fix
A simple fix is to update the conda source to match the GitHub version where it has a try catch for import error.
plot.py code from github that fixes the issue:
try: # sklearn >= 0.22
from sklearn.neighbors import KernelDensity
except ImportError:
from sklearn.neighbors.kde import KernelDensity
This is only an issue with the conda installation. It is fixed on github.
Versions Poppunk version 1.2.2 Scikit-learn version 1.2.2
Installation
conda install poppunk
Command used and output returned
poppunk --version
Output:ImportError
Describe the bug Popunk.plot.py tries to import KernelDensity from scikit-learn with
from sklearn.neighbors.kde import KernelDensity
and runs intoImportError
because KernelDensity in newer sklearn now lives atsklearn.neighbors.KernelDensity
Fix A simple fix is to update the conda source to match the GitHub version where it has a try catch for import error. plot.py code from github that fixes the issue: