Here are the pre-requisites:
1) Python 3.5+
2) scikit-image (python package)
3) scikit-learn (python package)
4) opencv-python (python package)
5) tileup (Ruby package)
6) convert (ImageMagick 6.7+)
7) Java 1.7+
8) macOS SDK library and Command Line Tools (CLT) (macOS specific)
xcode-select --install
This should run successfully. If not, please consult a detailed instruction manual here.
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
After doing this step, you should see a lot of header files in /usr/include.
If you do not see files in /usr/include or this folder does not exist, please consult this thread for possible solutions here.
Once Homebrew is installed, check ~/.bash_profile (do: cat ~/.bash_profile) that you have added /usr/local/bin to $PATH variable. If you do not:
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
Then do the following:
brew install imagemagick
#if python is not already installed, then do the below line. macOS's python (located in /Library/...) also works fine.
#brew install python@3
brew install pkg-config
brew install ruby
echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.bash_profile
brew unlink imagemagick
brew install imagemagick@6
brew link imagemagick@6 --force
echo 'export PATH="/usr/local/opt/imagemagick@6/bin:$PATH"' >> ~/.bash_profile
Note imagemagick v6 is required for macOS. Version 7 is known to have compatibility problem with Ruby rmagick package, and is therefore avoided.
/usr/local/opt/ruby/bin/gem install rmagick
/usr/local/opt/ruby/bin/gem install tileup
echo 'export PATH="/usr/local/lib/ruby/gems/2.6.0/bin:$PATH"' >> ~/.bash_profile #check gems version is correct
In the last step, check that the gems version (2.6.0) is indeed the version you have installed.
which python
Then do the following:
pip3 install -U scikit-image
pip3 install opencv-python
pip3 install scikit-learn
# these apply to both smfish-image-processing and giotto-viewer below:
# if do not wish to install dependencies, add --no-deps
# if upgrade from existing version, add --upgrade --no-cache-dir --force-reinstall
pip3 install smfish-image-processing
pip3 install giotto-viewer
open /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include
sudo apt-get install imagemagick
sudo apt install ruby
sudo apt install ruby-dev
sudo apt install libmagickwand-dev
sudo gem install tileup
pip3 install --user scikit-image
pip3 install --user opencv-python
pip3 install --user scikit-learn
# these apply to both smfish-image-processing and giotto-viewer below:
# if do not wish to install dependencies, add --no-deps
# if upgrade from existing version, add --upgrade --no-cache-dir --force-reinstall
pip3 install --user smfish-image-processing
pip3 install --user giotto-viewer