Installation

Standard

Installation via pip from PyPi

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:

cd my_python_path/site-packages/nutsml
pytest

Note

If you don’t know where your site-packages are, run the following 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

git clone https://github.com/maet3608/nuts-ml.git
cd nuts-ml
python setup.py install
pytest

Upgrade

For upgrading an existing installation run

pip install nutsml --upgrade

or if installed via git clone and setup.py

cd nuts-ml
python setup.py install --force

Virtual environment

Create virtual environment

pip install virtualenv
cd my_projects
virtualenv vnuts

Activate/deactivate environment

Linux, Mac

$ source vnuts/bin/activate
$ deactivate

Windows

> vnuts\Scripts\activate.bat
> vnuts\Scripts\deactivate.bat

Install nuts-ml in virtual environment (here for Linux/Mac)

source vnuts/bin/activate
pip install nutsml