最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python 3.x - Installation from a local package by pip is not possible on a kaggle notebook in an internet off environment - Stac

programmeradmin4浏览0评论

I am participating in a kaggle competition where internet off is required. In this context, I would like to create an environment in kaggle notebook where I can use the swe agent. However, only python 3.10 is available there, and I cannot provide the python 3.11 or higher environment required for swe agent. Therefore, I am trying to create a python 3.11 virtual environment with uv venv and run my swe agent there.

But I can't install from local packages and can't run swe agent. What is the solution? I get this error especially in this part. Here is the minimal code.

!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.
"""

I am participating in a kaggle competition where internet off is required. In this context, I would like to create an environment in kaggle notebook where I can use the swe agent. However, only python 3.10 is available there, and I cannot provide the python 3.11 or higher environment required for swe agent. Therefore, I am trying to create a python 3.11 virtual environment with uv venv and run my swe agent there.

But I can't install from local packages and can't run swe agent. What is the solution? I get this error especially in this part. Here is the minimal code. https://www.kaggle/code/ooooooooooooooooo/notebook336e888d96

!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.
"""
Share Improve this question asked Mar 8 at 20:28 RyoRyo 213 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

The error was resolved by replacing the relevant code with the code below.

!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

Using the code below and looking at the details, I found that the problem was caused by the setuptools installation, so I added the setuptools wheel file.

pip install  -e /kaggle/working/sweagent/. --no-index -vvv

https://www.kaggle/code/ooooooooooooooooo/notebook336e888d96

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论