首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Google Collab中安装HyperOpt-Sklearn库?

如何在Google Collab中安装HyperOpt-Sklearn库?
EN

Stack Overflow用户
提问于 2020-10-20 01:05:19
回答 1查看 298关注 0票数 0

每次我尝试在Google Collab中安装HyperOpt-Sklearn库时,都会出现以下错误:

代码语言:javascript
复制
fatal: destination path 'hyperopt-sklearn' already exists and is not an empty directory.
/bin/bash: line 0: cd: hyperopt: No such file or directory
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode: /content

我不确定为什么这个库有错误,而其他库没有。

我使用他们在网站上推荐的安装代码:

代码语言:javascript
复制
!git clone https://github.com/hyperopt/hyperopt-sklearn.git
!cd hyperopt
!pip install -e .
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-10-20 01:39:16

尽管他们的文档中没有提到,但事实证明,这个包可以在PyPi上获得,并且可以通过pip简单地安装;以下是在Google Colab笔记本中运行的:

代码语言:javascript
复制
!pip install hpsklearn

Collecting hpsklearn
  Downloading https://files.pythonhosted.org/packages/ce/cb/61b99f73621e2692abd0e730f7888a9983d01f626868336fa1db1d57bc1e/hpsklearn-0.1.0.tar.gz
Requirement already satisfied: hyperopt in /usr/local/lib/python3.6/dist-packages (from hpsklearn) (0.1.2)
Collecting nose
  Downloading https://files.pythonhosted.org/packages/15/d8/dd071918c040f50fa1cf80da16423af51ff8ce4a0f2399b7bf8de45ac3d9/nose-1.3.7-py3-none-any.whl (154kB)
     |████████████████████████████████| 163kB 5.3MB/s 
Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from hpsklearn) (1.18.5)
Requirement already satisfied: scikit-learn in /usr/local/lib/python3.6/dist-packages (from hpsklearn) (0.22.2.post1)
Requirement already satisfied: scipy in /usr/local/lib/python3.6/dist-packages (from hpsklearn) (1.4.1)
Requirement already satisfied: networkx in /usr/local/lib/python3.6/dist-packages (from hyperopt->hpsklearn) (2.5)
Requirement already satisfied: future in /usr/local/lib/python3.6/dist-packages (from hyperopt->hpsklearn) (0.16.0)
Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from hyperopt->hpsklearn) (1.15.0)
Requirement already satisfied: pymongo in /usr/local/lib/python3.6/dist-packages (from hyperopt->hpsklearn) (3.11.0)
Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (from hyperopt->hpsklearn) (4.41.1)
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.6/dist-packages (from scikit-learn->hpsklearn) (0.16.0)
Requirement already satisfied: decorator>=4.3.0 in /usr/local/lib/python3.6/dist-packages (from networkx->hyperopt->hpsklearn) (4.4.2)
Building wheels for collected packages: hpsklearn
  Building wheel for hpsklearn (setup.py) ... done
  Created wheel for hpsklearn: filename=hpsklearn-0.1.0-cp36-none-any.whl size=23915 sha256=44744a68278f221b86c4e3e98ca5671bce66901893dfb93af1844e01dbc7b03f
  Stored in directory: /root/.cache/pip/wheels/41/ee/c4/3c267cbf78f0905434ee36b915d97a20610ad3af7ff3c75852
Successfully built hpsklearn
Installing collected packages: nose, hpsklearn
Successfully installed hpsklearn-0.1.0 nose-1.3.7
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64432043

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档