semvec/pypi-packages huggingface dataset:
python-Kmeans-clustering-package 1.0
An example python unsupervised clustering package for BMI 500 course
License: MIT

# The Kmeans unsupervised clustering package

# Contents
The package will automatically download the iris data collected from UCI. The dataset contains three classes of flowers, and the clustering algorithm is to 

# FAQ

## How do I install and use a package in Development Mode?

[Development Mode](https://packaging.python.org/distributing/#working-in-development-mode) installs the package in "editable" mode so that you can change the source for your package in the actual source directory and consuming Python scripts/applications will see your edits the next time they run. To install your package in Development Mode run `install-package-devmode.sh`.
Note that this script also runs `pip show boopackage` to confirm that the package `boopackage` is installed.

## How do I Package/Bundle/Zip/Prepare my source code into a distributable package that I can distribute to others to use in their own Python apps?

Run `build-package.sh` to prepare your package source code for distribution. This will deploy a distributable Python package into `package-project/src/dist/boopackage-1.0.tar.gz`.

## How do other users install the package once it's built?

Other users can run `pip install boopackage-1.0.tar.gz` to install your package. See `install-built-package.sh` as an example. To use the package once it's installed see `test-consume-package.sh` which simply runs the Python script/app in `package-consumer-project/consumepackage.py` that uses the package `boopackage`.

Alternatively, you can [upload your built package to PyPI](https://packaging.python.org/distributing/#uploading-your-project-to-pypi) and then they can install it by running `pip install boopackage`.

## What are the differences between "Python Packages" and eggs?

I've been trying to figure that out myself. I can tell you that eggs appear to [essentially be deprecated](https://packaging.python.org/discussions/wheel-vs-egg/) and as noted on the previously linked python.org site _Wheel is currently considered the standard for built and binary packaging for Python._ Therefore I no longer maintain an example of building eggs, but some docs you might find interesting are as follows: "Python Packages" are documented at https://packaging.python.org/distributing/ and Eggs are documented at http://peak.telecommunity.com/DevCenter/PythonEggs

# Troubleshooting

## After installing the package I still see the error 'ImportError: No module named <mypackage>' when trying to use it in a script/app.

It is important that the `setup.py` is in the **parent** of the actual root package folder. If you don't do this you won't get any errors, and pip will show you're package as installed (e.g. with `pip show <mypackage>`) but consuming scripts of the package won't ever find the package and will always get the `ImportError`.

So this also implies that the "package" isn't what you specify as the name of your package in `setup.py`. Although `pip` uses the name in `setup.py` to determine whether it is installed, Python itself only cares about the directory that contains the `__init__.py` file.