-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Gets stuck while trying to activate virtual environment #2799
Comments
If you'd run the command manually, check what interactive prompt messages you get. |
When I do it from the opendevin terminal, It get's stuck the same way with nothing in the logs. If I do it from just the native mac terminal it works. |
Same issue. I create a new project and it gets stuck trying to activate the environment. Apple M1, Docker Desktop w/ 26.1.4. Workspace directory: workspace directory: /Users/amosk/opendevin Started with
|
OpenDevin is using miniforge3, that might be the reason. 🤔 |
Is there any way to get more logs? How do I switch on debug logging? |
Hope some expert comes in here with a solution this really needs to be fixed makes doing certain things pointless. |
I'll try to ping some people to take a look at this ASAP. |
It may be that the virtual environment changes the shell prompt. My first thought is that the prompt in the shell is being modified, which prevents the proper detection of command completion, similar to the following:
However, I'm not 100% sure if this is the issue. |
Oh yes. I have a oh-my-zsh setup that shows the current branch. So the prompt does in fact change! |
@iFurySt Yes - I think this is the root cause! So right now the prompt change would break But it is not perfect, since ideally the agent should know what environment it is dealing with. The slightly long-term plan was to completely replace |
@xingyaoww is there an equivalent temporary workaround for virtualenv? Right now this is the main blocker for me. |
Hi anjor. We are working to make the opendevin Python runtime completely transparent to users. Once this PR #2796 is merged, the default Python will point to a clean python environment |
Sorry maybe I am misunderstanding. I don't want to use the default interpreter. I would prefer to have a virtualenv per project. Or does opendevin maintain it's own sandbox anyway? |
@anjor |
Yeah that will work. Thanks! |
@xingyaoww just so I understand this for future. Is this an issue we want to tackle and one that should stay open? |
@mamoodi Yes! This is among the first batch of issues we want to address after the architecture refractor. |
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
I attempted to run ./workspace/requirements.txt
./workspace/init.sh#!/bin/bash
# /workspace/init.sh
# Store original directory
ORIG_DIR=$PWD
cd /workspace
# Display user and home directory
echo $USER
echo $HOME
# Create and setup virtual environment
/opendevin/miniforge3/bin/python -m venv /home/opendevin/env
sudo chmod 7777 /home/opendevin
export VIRTUAL_ENV_DISABLE_PROMPT=1
source /home/opendevin/env/bin/activate
# Check Python and pip locations
which python
which pip
# Update pip and install requirements
pip install -U pip
if [ -f "requirements.txt" ]; then
echo "requirements.txt found in /workspace"
pip install -r requirements.txt 2>&1
else
echo "requirements.txt not found in /workspace"
fi
pip freeze
# Return to original directory
cd $ORIG_DIR
# EOF Standard Output
|
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for over 30 days with no activity. |
Is there an existing issue for the same bug?
Describe the bug
OpenDevin gets stuck while trying to activate an existing virtual environment.
OpenDevin often wants to install packages to be able to test locally. I would prefer it to use a virtual environment, so I usually ask it to activate the virtual environment. And I have consistently seen it get stuck:
Current OpenDevin version
Installation and Configuration
Vanilla configuration using default
gpt-4o
and my api key.The text was updated successfully, but these errors were encountered: