Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
linenumberstrue
git clone https://github.com/cytomine/Cytomine-python-datamining

2.3

...

Install pyxit (located in cytomine-datamining/algorithms/pyxit/)

Pyxit algorithms (for classification, segmentation,...) rely on scikit-learn so it is better to get the very latest version of scikit-learn and install it manually into the anaconda dir (otherwise you might get an error message related to Tree and tree.pxd file). The following procedure will create the newer sklearn version into $HOME/miniconda2/envs/cytomine/lib/python2.7/site-packages/scikit-learn/sklearn :

Code Block
languagebash
linenumberstrue
cd  $HOME/miniconda2/envs/cytomine/lib/python2.7/site-packages
git clone https://github.com/scikit-learn/scikit-learn.git
cd scikit-learn
make 
python setup.py build
python setup.py install

During the execution of make and unless you have installed nosetests, you should get the error shown in the following code box. It it happens, it is not a problem and you can proceed with the rest of the installation.

Code Block
languagetext
[...]
nosetests -s -v sklearn
make: nosetests : commande introuvable
make: *** [test-code] Erreur 127

Remove the older sklearn anaconda version and move the newest version to the anaconda location:

Code Block
languagebash
linenumberstrue
cd $HOME/miniconda2/envs/cytomine/lib/python2.7/site-packages/
mv sklearn/ sklearn-old/ 
ln -s scikit-learn/sklearn/ sklearn 

Then go back to Cytomine Python Datamining directory and compile Cythonize, compile and install pyxit:

Code Block
languagebash
linenumberstrue
cd $HOME/Cytomine/Cytomine-python-datamining/cytomine-datamining/algorithms/pyxit/
cython _estimator.pyx
python setup.py build
python setup.py install

...