OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

[langchains] tries to use the wrong `python` command

Open samarth-kadaba opened this issue 1 year ago • 2 comments

Describe the bug OpenDevin cannot run python code because the environment variable for its sandbox does not seem to be set Steps to Reproduce

  1. Fahrenheit_to_celsius example given in ReadMe

Expected behavior

Actual behavior

Additional context ACTION: CmdRunAction(command='python fahrenheit_to_celsius.py', background=False)

    OBSERVATION:
    bash: line 1: python: command not found

ACTION: CmdRunAction(command='apt update && apt install python3 -y', background=False)

    OBSERVATION:

    WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

    Reading package lists...
    E: List directory /var/lib/apt/lists/partial is missing. - Acquire (13: Permission denied)

samarth-kadaba avatar Mar 26 '24 19:03 samarth-kadaba

Noticed that it was executing functions with python and pip whereas it should be using python3 and pip3. How do I change default commands it uses?

samarth-kadaba avatar Mar 26 '24 19:03 samarth-kadaba

Hmm--this isn't a simple issue. The LLM is responsible for deciding what commands to run and what to try. But we could potentially provide it with a list of installed software as part of the prompt

Related issue: https://github.com/OpenDevin/OpenDevin/issues/216

rbren avatar Mar 26 '24 20:03 rbren

Hi @rbren, can I please take up this task?

VJlaxmi avatar Mar 29 '24 17:03 VJlaxmi

I don't think there's any easy solution here--I'm going to close it for now. We have a separate issue tracking the ability to install python

rbren avatar Mar 29 '24 19:03 rbren

if I just change the container on sandbox.py? quay.io/jupyter/scipy-notebook

hqnicolas avatar Mar 31 '24 01:03 hqnicolas

yes you can set the sandbox container image in your config.toml

rbren avatar Mar 31 '24 15:03 rbren