Skip to content

Instantly share code, notes, and snippets.

@mberman84
Created March 30, 2024 16:23
Show Gist options
  • Save mberman84/2ad782e90d18650dfdf42d677c18c520 to your computer and use it in GitHub Desktop.
Save mberman84/2ad782e90d18650dfdf42d677c18c520 to your computer and use it in GitHub Desktop.
OpenDevin Installation
git clone https://github.com/OpenDevin/OpenDevin.git
cd OpenDevin
conda create -n od python=3.10
conda activate od
docker ps
(optional) install docker if not already installed
docker pull ghcr.io/opendevin/sandbox
export OPENAI_API_KEY={your key}
(optional I had to install rust) curl --proto '=https' --tlsv1.2 -sSf [https://sh.rustup.rs](https://sh.rustup.rs/) | sh
(optional) restart terminal
python -m pip install -r requirements.txt
(optional) orjson issue (MacOS)
- pip uninstall orjson
- pip install --no-cache-dir --only-binary :all: orjson
uvicorn opendevin.server.listen:app --port 3000
@francoross
Copy link

I get this error after "uvicorn opendevin.server.listen:app --port 3000": ModuleNotFoundError: No module named 'llama_index.vector_stores
I installed on WSL Ubuntu but this error I can't fix it so the backend doesn't start

(OpenDevin) (base) ubuntu@Peter:~/OpenDevin$ uvicorn opendevin.server.listen:app --port 3000 Traceback (most recent call last): File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/bin/uvicorn", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/main.py", line 409, in main run( File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/main.py", line 575, in run server.run() File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run return asyncio.run(self.serve(sockets=sockets)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 188, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 120, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve await self._serve(sockets) File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve config.load() File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/config.py", line 433, in load self.loaded_app = import_from_string(self.app) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/importer.py", line 22, in import_from_string raise exc from None File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string module = importlib.import_module(module_str) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/home/ubuntu/OpenDevin/opendevin/server/listen.py", line 4, in <module> import agenthub # noqa F401 (we import this to get the agents registered) ^^^^^^^^^^^^^^^ File "/home/ubuntu/OpenDevin/agenthub/__init__.py", line 5, in <module> from . import monologue_agent # noqa: E402 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/OpenDevin/agenthub/monologue_agent/__init__.py", line 2, in <module> from .agent import MonologueAgent File "/home/ubuntu/OpenDevin/agenthub/monologue_agent/agent.py", line 28, in <module> from agenthub.monologue_agent.utils.memory import LongTermMemory File "/home/ubuntu/OpenDevin/agenthub/monologue_agent/utils/memory.py", line 5, in <module> from llama_index.vector_stores.chroma import ChromaVectorStore ModuleNotFoundError: No module named 'llama_index.vector_stores'

@tellesus
Copy link

tellesus commented Apr 3, 2024

I had this one. I fixed it by installing something. I think I solved it by just pip install llama_index
I had to manually use pip to install basically everything in the dependencies file since the file wasn't working for me.

@francoross
Copy link

I think I solved it by just pip install llama_index

nothing change if i use pip install llama_index

@tellesus
Copy link

tellesus commented Apr 3, 2024 via email

@srad11
Copy link

srad11 commented Apr 3, 2024

I think I solved it by just pip install llama_index

nothing change if i use pip install llama_index

I am facing the same issue. I have uninstalled and reinstalled it as well and still nothing. i keep getting the error ModuleNotFoundError: No module named 'llama_index.vector_stores'

@NetNitro
Copy link

NetNitro commented Apr 4, 2024

i am getting

/opt/homebrew/Caskroom/miniconda/base/envs/myenv/bin/python" -m pip install -r requirements.txt

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

it can not find requirements

try "pip freeze > requirements.txt" and then try installing the requirements

@LewyCoda
Copy link

LewyCoda commented Apr 4, 2024

I get this error after "uvicorn opendevin.server.listen:app --port 3000": ModuleNotFoundError: No module named 'llama_index.vector_stores I installed on WSL Ubuntu but this error I can't fix it so the backend doesn't start

(OpenDevin) (base) ubuntu@Peter:~/OpenDevin$ uvicorn opendevin.server.listen:app --port 3000 Traceback (most recent call last): File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/bin/uvicorn", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/main.py", line 409, in main run( File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/main.py", line 575, in run server.run() File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run return asyncio.run(self.serve(sockets=sockets)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 188, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/runners.py", line 120, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/server.py", line 69, in serve await self._serve(sockets) File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/server.py", line 76, in _serve config.load() File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/config.py", line 433, in load self.loaded_app = import_from_string(self.app) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/importer.py", line 22, in import_from_string raise exc from None File "/home/ubuntu/.local/share/virtualenvs/OpenDevin-Etc5k-cQ/lib/python3.11/site-packages/uvicorn/importer.py", line 19, in import_from_string module = importlib.import_module(module_str) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen importlib._bootstrap>", line 1206, in _gcd_import File "<frozen importlib._bootstrap>", line 1178, in _find_and_load File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 940, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "/home/ubuntu/OpenDevin/opendevin/server/listen.py", line 4, in <module> import agenthub # noqa F401 (we import this to get the agents registered) ^^^^^^^^^^^^^^^ File "/home/ubuntu/OpenDevin/agenthub/__init__.py", line 5, in <module> from . import monologue_agent # noqa: E402 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/OpenDevin/agenthub/monologue_agent/__init__.py", line 2, in <module> from .agent import MonologueAgent File "/home/ubuntu/OpenDevin/agenthub/monologue_agent/agent.py", line 28, in <module> from agenthub.monologue_agent.utils.memory import LongTermMemory File "/home/ubuntu/OpenDevin/agenthub/monologue_agent/utils/memory.py", line 5, in <module> from llama_index.vector_stores.chroma import ChromaVectorStore ModuleNotFoundError: No module named 'llama_index.vector_stores'

I fixed this by using the following
python3 -m pipenv install llama-index-vector-stores-chroma
python3 -m pip install llama-index-vector-stores-chroma
Needs to be add to the pipenv for install

@Saumyaj100300
Copy link

Im getting ERROR: Could not find a version that satisfies the requirement openai._models (from versions: none)
ERROR: No matching distribution found for openai._models

@tellesus
Copy link

tellesus commented Apr 4, 2024 via email

@Bahrain-AI
Copy link

Bahrain-AI commented Apr 4, 2024

here's how it i got it to work:

Took me about 2 hours to finally fix all environment issues.

INSTRUCTIONS:

Using Pipenv with Python 3.11

Steps:

  1. Install Python 3.11:

  2. Install Pipenv:

    • Run pip install pipenv.
  3. Setup Project:

    • Navigate to your project directory.
    • Initialize Pipenv with Python 3.11: pipenv --python 3.11.
  4. Activate Environment:

    • Enter the environment: pipenv shell.
  5. Manage Dependencies:

    • Install from Pipfile:
      Runpipenv install.
  6. Run At Once - FRONT AND BACK:

    • Run make run.

This is how i managed to have the UI run locally.
Cheers/

@srad11
Copy link

srad11 commented Apr 4, 2024

I think I solved it by just pip install llama_index

nothing change if i use pip install llama_index

I faced the same issue but managed to get it working. tried the recommended steps in this

@rahulgowda223
Copy link

Hi! Everything looks fine until I use it. Error: Oops. Something went wrong: 'NoneType' object has no attribute 'request' devil

Hi , is your issue resolved? I am getting the same error

@mr-v-v-v
Copy link

mr-v-v-v commented Apr 5, 2024

Where is requirements.txt ?????? did somebody see this file in repository? it's crazy

@Venkatramasubban
Copy link

Venkatramasubban commented Apr 7, 2024

Processing /home/ktietz/src/ci/alabaster_1611921544520/work
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: '/System/Volumes/Data/home/ktietz/src/ci/alabaster_1611921544520/work'

Mine is macOS - Monterey 12.7.4

@tellesus
Copy link

tellesus commented Apr 7, 2024 via email

@gokulj2005
Copy link

Where is requirements.txt ?????? did somebody see this file in repository? it's crazy

Did you find it, even i have the same issue, there is no requirements.txt file in it

@tellesus
Copy link

tellesus commented Apr 7, 2024 via email

@mr-v-v-v
Copy link

mr-v-v-v commented Apr 7, 2024

Where is requirements.txt ?????? did somebody see this file in repository? it's crazy

Did you find it, even i have the same issue, there is no requirements.txt file in it

didn't find. I don't about what they are talking all.
may be they are bots. because this instruction doesn't work.

@tellesus
Copy link

tellesus commented Apr 7, 2024 via email

@acodewalker
Copy link

Where is requirements.txt ?????? did somebody see this file in repository? it's crazy

Did you find it, even i have the same issue, there is no requirements.txt file in it

didn't find. I don't about what they are talking all. may be they are bots. because this instruction doesn't work.

I too got stuck on the requirements.txt, I thought it might be because I opted to use venv instead of conda but after watching a few other OpenDevin youtube videos I found that the command python -m pipenv requirements > requirements.txt && python -m pipenv run pip install -r requirements.txt worked for me. I've also since got this working on my windows machine using make. However I'm still having issues getting either method work with local LLM's.

@Anis111111
Copy link

uvicorn opendevin.server.listen:app --port 3000
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\Anis--M\anaconda3\Scripts\uvicorn.exe_main
.py", line 7, in
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\uvicorn\main.py", line 409, in main
run(
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\uvicorn\main.py", line 575, in run
server.run()
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\uvicorn\server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\uvicorn\server.py", line 69, in serve
await self._serve(sockets)
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\uvicorn\server.py", line 76, in serve
config.load()
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\uvicorn\config.py", line 433, in load
self.loaded_app = import_from_string(self.app)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\uvicorn\importer.py", line 22, in import_from_string
raise exc from None
File "C:\Users\Anis--M\anaconda3\Lib\site-packages\uvicorn\importer.py", line 19, in import_from_string
module = importlib.import_module(module_str)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Anis--M\anaconda3\Lib\importlib_init
.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in _find_and_load_unlocked
File "", line 690, in _load_unlocked
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\Anis--M\Desktop\OpenDevin\opendevin\server\listen.py", line 5, in
import litellm
ModuleNotFoundError: No module named 'litellm'
what shoud i do??

@tellesus
Copy link

tellesus commented Apr 8, 2024 via email

@Jossyboydgenius
Copy link

I get stuck trying to install the requirements, please help!!!
Screenshot 2024-04-09 at 11 37 13 AM

which python
/opt/anaconda3/envs/od/bin/python
(od) techapostle@Femis-MacBook-Pro OpenDevin % python -m pip install -r requirements.txt
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
(od) techapostle@Femis-MacBook-Pro OpenDevin % /opt/anaconda3/envs/od/bin/python -m pip install -r requirements.txt
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'

@tellesus
Copy link

tellesus commented Apr 9, 2024 via email

@jono3313
Copy link

jono3313 commented Apr 9, 2024

(od) C:\Users\honei\OneDrive\Desktop\OpenDevin-main\OpenDevin-main>uvicorn opendevin.server.listen:app --port 3000
C:\Users\honei\anaconda3\envs\od\lib\site-packages\pydantic_internal_fields.py:151: UserWarning: Field "model_list" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = ().
warnings.warn(
C:\Users\honei\anaconda3\envs\od\lib\site-packages\pydantic_internal_fields.py:151: UserWarning: Field "model_name" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = ().
warnings.warn(
C:\Users\honei\anaconda3\envs\od\lib\site-packages\pydantic_internal_fields.py:151: UserWarning: Field "model_group_alias" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = ().
warnings.warn(
C:\Users\honei\anaconda3\envs\od\lib\site-packages\pydantic_internal_fields.py:151: UserWarning: Field "model_info" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = ().
warnings.warn(
C:\Users\honei\anaconda3\envs\od\lib\site-packages\pydantic_internal_fields.py:151: UserWarning: Field "model_id" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting model_config['protected_namespaces'] = ().
warnings.warn(

@tellesus
Copy link

tellesus commented Apr 9, 2024 via email

@BallisticMystik
Copy link

Requirements.....

datasets
pandas
litellm
termcolor
seaborn
docker
fastapi
uvicorn[standard]
ruff
mypy
langchain
langchain-core
langchain-community
llama-index
llama-index-vector-stores-chroma
chromadb
llama-index-embeddings-huggingface
llama-index-embeddings-azure-openai
llama-index-embeddings-ollama
google-generativeai
toml

@MM-Balogun
Copy link

-MacBook-Pro OpenDevin % uvicorn opendevin.server.listen:app --port 3000
zsh: segmentation fault uvicorn opendevin.server.listen:app --port 3000
Did anyone run into this error?

@shivakumar414
Copy link

I am getting this error while running "uvicorn opendevin.server.listen:app --port 3000" command.
Tried re installing pexpect but no luck. the version of Pexpect is 4.9.0. Can anyone help?

ERROR:root:<class 'ImportError'>: cannot import name 'spawn' from 'pexpect' (C:\PicsDocs\OpenDevin\myenv\Lib\site-packages\pexpect_init_.py)
PS C:\PicsDocs\OpenDevin> import pexpect.popen_spawn
import : The term 'import' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name,
or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • import pexpect.popen_spawn
  •   + CategoryInfo          : ObjectNotFound: (import:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    

@dhyeypatel03
Copy link

error with pexpect..didi some changes in init.py but still error is there..

error
ERROR:root:<class 'ImportError'>: cannot import name 'spawn' from partially initialized module 'pexpect' (most likely due to a circular import) (C:\ProgramData\anaconda3\envs\od\Lib\site-packages\pexpect_init_.py)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment