Installation

SimpleML currently runs best on Python 3.6+; other versions may work but are not explicitly supported.

You can install SimpleML via several different methods. The simplest is via pip:

pip install simpleml

While the above is the simplest method, the recommended approach is to create a virtual environment via conda, before installation. Assuming you have conda installed, you can then open a new terminal session and create a new virtual environment:

conda create -n simpleml python
source activate simpleml

Once the virtual environment has been created and activated, SimpleML can be installed via pip install simpleml as noted above. Alternatively, if you have the project source, you can install SimpleML using the distutils method:

cd path-to-source
python setup.py install

If you have Git installed and prefer to install the latest bleeding-edge version rather than a stable release, use the following command:

pip install -e "git+https://github.com/eyadgaran/simpleml.git@master#egg=simpleml"

Optional packages

SimpleML comes configured with a few optional dependencies. The base installation will work without any issues if they are not installed, but extended functionality will not be available.

The general command is pip install simpleml[extras] (substituting “extras” with the group of dependencies)

These are the current supported extras:

'postgres': ["psycopg2"]
'deep-learning': ["keras", "tensorflow", "hickle"]
'hdf5': ["hickle"]
'cloud': ["onedrivesdk", "apache-libcloud", "pycrypto", "sshtunnel"]

Additionally, a convenience extra titled all is defined to install the full list of optional dependencies.

While it is recommended to install optional dependencies via simpleml, installing a minimal set of dependencies manually will function the same way. Any dependency that is found will load automatically on import and null types will be assigned to the rest. Attempting to execute code that references a missing dependency will result in an error.

Note: running SimpleML in an interactive environment (eg Jupyter) will require a restart of the kernel to dynamically install new dependencies. For most libraries this is not the case because there is no caching of missing imports, but SimpleML only checks for dependencies on the first import. The relevant code can be found here: https://github.com/eyadgaran/SimpleML/blob/master/simpleml/imports.py

Dependencies

When SimpleML is installed, the following dependent Python packages should be automatically installed. These are necessary dependencies and SimpleML will not function properly without them.

Upgrading

If you installed SimpleML via pip and wish to upgrade to the latest stable release, you can do so by adding --upgrade:

pip install --upgrade simpleml

If you installed via distutils or the bleeding-edge method, simply perform the same step to install the most recent version.

Database Migrations

Database state can be managed as part of development scripts or independently. (Best practice for teams and production use cases is to separate permissions for insert/delete/admin).

See database configuration for instructions: Database