Installation

Standard

Installation via pip from PyPi

pip install nutsml
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']

Verification

Ensure that nutsflow and nutsml can be imported and work. Open Python shell via ``python` and enter the following code

>>> from nutsflow import *
>>> from nutsml import *
>>> samples = [('pos', 1), ('pos', 1), ('neg', 0)]
>>> samples >> Stratify(1) >> Collect()
[('neg', 0), ('pos', 1)]

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