Installation¶
pip install so-magic
See the somoclu documentation pages to read more about the library features.
Linux & macOS¶
Unfortunately, it is possible that none of the two official installation methods for
somoclu would work as expected. Namely the method of invoking pip install somoclu
and the
method of building somoclu from source.
It has been documented (see issue 136), and verified by the author on a macOS Catalina, that you might run into an issue with clang and OpenMP that breaks the build process. It is also possible that installation succeeds, but when your client code invokes the “wrap_train” function, a NameError exception (see issue 28) is thrown on the Python side.
Thus, it is recommended that you install so-magic using anaconda. Anaconda succeeds in doing conda install somoclu in contrast to pip
Prepare a conda environment (just like a virtualenv):
ENV_PATH=so-magic-env
conda create -p $ENV_PATH -y python=3.7
FILE_TO_SOURCE="$HOME/miniconda/etc/profile.d/conda.sh"
if [[ ! -f $FILE_TO_SOURCE ]]; then
source "$HOME/miniconda3/etc/profile.d/conda.sh"
else
source "$HOME/miniconda/etc/profile.d/conda.sh"
fi
hash -r
conda config --set always_yes yes --set changeps1 no
conda update -q conda
conda info -a
conda activate $ENV_PATH
Install somoclu dependency:
conda install somoclu --channel conda-forge
Install latest so-magic:
pip install so-magic