============ Installation ============ Standard -------- Installation via ``pip`` from `PyPi `_ .. code:: pip install nutsml Verification ------------ Ensure that nutsml can be imported and does work. Open Python shell via ``python`` and enter the following code: >>> from nutsml import * >>> samples = [('pos', 1), ('pos', 1), ('neg', 0)] >>> samples >> CollectStratified(1) >> Sort() [('neg', 0), ('pos', 1)] You can also run the entire unit test suite to verify correct function of **nuts-ml**: .. code:: cd my_python_path/site-packages/nutsml pytest .. note:: If you don't know where your ``site-packages`` are, run the following code .. code:: python -c "import site; print(site.getsitepackages())" ['C:\\Maet\\Software\\Anaconda', 'C:\\Maet\\Software\\Anaconda\\lib\\site-packages'] Bleeding-edge ------------- If you want the bleeding-edge version, install via ``git clone`` from `GitHub `_ .. code:: git clone https://github.com/maet3608/nuts-ml.git cd nuts-ml python setup.py install pytest Upgrade ------- For upgrading an existing installation run .. code:: pip install nutsml --upgrade or if installed via ``git clone`` and ``setup.py`` .. code:: cd nuts-ml python setup.py install --force Virtual environment ------------------- Create virtual environment .. code:: pip install virtualenv cd my_projects virtualenv vnuts Activate/deactivate environment **Linux, Mac** .. code:: $ source vnuts/bin/activate $ deactivate **Windows** .. code:: > vnuts\Scripts\activate.bat > vnuts\Scripts\deactivate.bat Install **nuts-ml** in virtual environment (here for Linux/Mac) .. code:: source vnuts/bin/activate pip install nutsml