首页 > 解决方案 > 如何在谷歌 colab 中安装 pyearth?

问题描述

这曾经对我有用,但是从现在两天开始,我遇到了这个问题:

pip install sklearn-contrib-py-earth
Collecting sklearn-contrib-py-earth
  Using cached https://files.pythonhosted.org/packages/f8/c4/53a24835bafac880036446cc13839471a025b41de1436543f30d15d846c1/sklearn-contrib-py-earth-0.1.0.tar.gz
Requirement already satisfied: scipy>=0.16 in /usr/local/lib/python3.7/dist-packages (from sklearn-contrib-py-earth) (1.4.1)
Requirement already satisfied: scikit-learn>=0.16 in /usr/local/lib/python3.7/dist-packages (from sklearn-contrib-py-earth) (0.22.2.post1)
Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from sklearn-contrib-py-earth) (1.15.0)
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib/python3.7/dist-packages (from scipy>=0.16->sklearn-contrib-py-earth) (1.19.5)
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn>=0.16->sklearn-contrib-py-earth) (1.0.1)
Building wheels for collected packages: sklearn-contrib-py-earth
  Building wheel for sklearn-contrib-py-earth (setup.py) ... error
  ERROR: Failed building wheel for sklearn-contrib-py-earth
  Running setup.py clean for sklearn-contrib-py-earth
Failed to build sklearn-contrib-py-earth
Installing collected packages: sklearn-contrib-py-earth
    Running setup.py install for sklearn-contrib-py-earth ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-s6vbb2vf/sklearn-contrib-py-earth/setup.py'"'"'; __file__='"'"'/tmp/pip-install-s6vbb2vf/sklearn-contrib-py-earth/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-j66r3m9x/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

标签: scikit-learngoogle-colaboratorypython-wheel

解决方案


尝试这个:

git clone git://github.com/scikit-learn-contrib/py-earth.git
cd py-earth
python setup.py install --cythonize

推荐阅读