python - Scikit-learn 教程文档位置

标签 python ubuntu scikit-learn

我在 Ubuntu 14.04 上安装了 scikit-learn 0.16.1,并且正在学习教程。 SKL 已安装所有默认配置。教程说明

The source of this tutorial can be found within your scikit-learn folder: scikit-learn/doc/tutorial/text_analytics/

我在整个驱动器上都使用了find,但没有“tutorial”文件夹。没有任何地方。有人知道这些文件的实际安装位​​置吗?

最佳答案

查找包内容

包的安装位置取决于您安装 scikit-learn 的方式

  • 如果您通过以下方式使用 Ubuntu 的包系统

    sudo apt-get install python-sklearn python-sklearn-doc
    

    (您通常需要 doc 包来获取随附的文档),那么教程就不见了。 doc/ 文件夹不包含在 python-sklearn-doc 包中。查看bug report .

    您可以通过以下方式找到包裹的内容

    dpkg-query --listfiles python-sklearn-doc
    
  • 如果您使用了 the Python Package Indexinstall it via

    pip install --user --install-option="--prefix=" -U scikit-learn
    

    ,那么安装应该在$HOME/.local/lib/python2.7/site-packages/sklearn。 (还有 pip show -f scikit-learn)但是一个

    find . | grep -i tutorial
    

    没有找到任何 tutorial/ 文件夹。

  • 如果您是从源代码安装的,请考虑通过 pip 重新安装,如 the warning states that

Warning

Packages installed with the python setup.py install command cannot be uninstalled nor upgraded by pip later. To properly uninstall scikit-learn in that case it is necessary to delete the sklearn folder from your Python site-packages directory.

解决方案

解决方案是使用源代码。下载master file或者通过 git 来完成:

    git clone https://github.com/scikit-learn/scikit-learn.git

git 存档超过 60 MiB,因此您可能更喜欢 master zip .

关于python - Scikit-learn 教程文档位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32183129/

相关文章:

python - 使用 Python 将 HTML 表示形式替换为 ascii

python - Pyplot 图例/键,但用于比例,就像在 map 上一样

python - 向后关系如何与 Django 查询集配合使用

python - 如何使用 Pandas 在 Iris 数据集中使用 SVM 回归

python - pandas 使用用户定义的时间间隔重新采样

maven - 在 GeoServer 中安装 GeoMesa Cassandra

java - 如何在 Ubuntu Linux 中安装 Amazon Corretto?

php - 正确的组所有权和对 vagrant 上 Laravel 应用程序/存储文件夹的权限?

python - Scikit分类比较/排名

python - scikit-learn 中的多标签分类与超参数搜索 : specifying averaging