在Internet环境中的Kaggle笔记本上不可能通过PIP汇总本地包装。 我正在参加需要关闭互联网的Kaggle竞赛。在这种情况下,我想在Kaggle Notebook中创建一个环境,可以在其中使用SWE代理。 但是,只有pyt ...

问题描述 投票:0回答:1
https://www.kaggle.com/code/oooooooooooooo/notebook336e888888888888888888888888888888

!my_env/bin/python -m pip wheel --wheel-dir /kaggle/input/packages-for-sweagent/packages -r /kaggle/input/konwinski-prize-requirements/requirements.txt """error Obtaining file:///kaggle/working/sweagent (from -r /kaggle/input/konwinski-prize-requirements/requirements.txt (line 83)) error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. """

!my_env/bin/python -m pip install --no-index --find-links=/kaggle/input/packages-for-sweagent/packages -r /kaggle/input/konwinski-prize-requirements/requirements.txt
"""
Looking in links: /kaggle/input/packages-for-sweagent/packages
Obtaining file:///kaggle/working/sweagent (from -r /kaggle/input/konwinski-prize-requirements/requirements.txt (line 83))
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
"""

通过将相关代码替换为下面的代码来解决错误。

!my_env/bin/python -m pip install -e /kaggle/working/sweagent/. --no-index \ --find-links=/kaggle/input/setuptools-75-8-2/ \ --find-links=/kaggle/input/packages-for-sweagent/packages
通过下面的代码并查看细节,我发现问题是由Setuptools安装引起的,因此我添加了Setuptools Wheel文件。
pip install  -e /kaggle/working/sweagent/. --no-index -vvv
python-3.x pip local offline kaggle
1个回答
0
投票
https://www.kaggle.com/code/oooooooooooooo/notebook336e888888888888888888888888888888

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.