1. Create virtual environment
python3 -m venv myenv
source myenv/bin/activate

3. Install sklearn-contrib-py-earth using Pip3 causes error.

pip3 install sklearn-contrib-py-earth
None

4. configure sklearn-contrib-py-earth using github repository.Before install required packages.

pip3 install numpy

After that clone sklearn-contrib-py-earth source from github repository

git clone http://github.com/jcrudy/py-earth.git

Reference

https://github.com/scikit-learn-contrib/py-earth/issues/208