离线 Kaggle 比赛中安装句子转换器

问题描述 投票:0回答:1

在 Kaggle 比赛中,提交必须是离线的。因此,我需要下载一些包,比如句子转换器。

我已经从github下载了源代码并上传了,我按照这个教程

但是我收到此错误(知道所有依赖项都已满足)

Building wheels for collected packages: sentence-transformers
  Building wheel for sentence-transformers (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      /opt/conda/lib/python3.10/site-packages/setuptools/dist.py:745: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!
      
              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.
      
              By 2023-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        opt = self.warn_dash_deprecation(opt, section)
      error: could not create 'build': Read-only file system
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for sentence-transformers
  Running setup.py clean for sentence-transformers
Failed to build sentence-transformers
ERROR: Could not build wheels for sentence-transformers, which is required to install pyproject.toml-based projects


有人遇到同样的错误吗?

谢谢您的帮助

python installation package kaggle sentence-transformers
1个回答
0
投票

您可以将句子转换器(或任何其他库)放入数据集中,将其链接到您的笔记本,然后复制到可写的工作中,然后构建,就像

!cp -r /kaggle/input/dataset-with-all-stuff/sentence_transformers ./
!pip install ./sentence_transformers/sentence-transformers-2.2.2/sentence-transformers-2.2.2 --no-index -find-links=file:///kaggle/working/sentence_transformers/
© www.soinside.com 2019 - 2024. All rights reserved.