【问题标题】:how to install pyearth in google colab?如何在谷歌 colab 中安装 pyearth?
【发布时间】:2021-03-06 06:30:23
【问题描述】:

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

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.

【问题讨论】:

  • 这种情况在许多平台上都会发生(不仅仅是 Gogle Colab)。我在 GitHub 上打开了issue
  • 嗨!我解决了这个问题。检查我编辑的答案。希望对您有所帮助!

标签: scikit-learn google-colaboratory python-wheel


【解决方案1】:

这对我有用:

pip install git+https://github.com/scikit-learn-contrib/py-earth@v0.2dev

【讨论】:

  • 在尝试了数以亿计的不同解决方案之后,这对我有用。非常感谢!
【解决方案2】:

试试这个:

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

【讨论】:

    猜你喜欢
    • 2020-05-07
    • 2019-11-14
    • 2021-04-23
    • 2018-09-13
    • 2021-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-04-17
    相关资源
    最近更新 更多