OpenDevinインストール手順メモ(4/8の時点)

環境インストール

poetry ←インストールしたが、zshで見つからずにインストールされていないエラーが出た。
どこにあったか分からず、poetryはどこにあるか探すために、ターミナルで以下のコマンドを実行。

find ~ -name poetry 2>/dev/null

システム全体から探すので結構時間がかかった。あちこちのアプリにアクセスする権限を求められていた。

/Users/username/にある、.zshrcをテキストエディターで開き、末に以下の文を追記。

export PATH="$HOME/.local/bin:$PATH"

そして、↓のコマンドで再起動。

source ~/.zshrc

エラーメモ:

make build実行後、以下のエラーが出た。

GPT-4に聞いたら、chroma-hnswlibのバージョンが競合してるか何なのか…

Building project...
Checking dependencies...
Checking Python installation...
Python 3.12.2 is already installed.
Checking npm installation...
npm 10.1.0 is already installed.
Checking Docker installation...
Docker version 25.0.3, build 4debf41 is already installed.
Checking Poetry installation...
Poetry (version 1.8.2) is already installed.
Dependencies checked successfully.
Pulling Docker image...
Using default tag: latest
latest: Pulling from opendevin/sandbox
f4bb4e8dca02: Pull complete 
cb57bead1a92: Pull complete 
ab01a13d977c: Pull complete 
Digest: sha256:b051045dd07803ec72da0342fca84d287f77c46ebde0ee2d57f551b863c8894e
Status: Downloaded newer image for ghcr.io/opendevin/sandbox:latest
ghcr.io/opendevin/sandbox:latest
What's Next?
  1. Sign in to your Docker account → docker login
  2. View a summary of image vulnerabilities and recommendations → docker scout quickview ghcr.io/opendevin/sandbox
Docker image pulled successfully.
Installing Python dependencies...
/bin/sh: chroma-hnswlib: command not found
Installing ...
Collecting chroma-hnswlib
  Downloading chroma-hnswlib-0.7.3.tar.gz (31 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
error: subprocess-exited-with-error
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [19 lines of output]
      Traceback (most recent call last):
        File "/opt/anaconda3/envs/opendevin/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/anaconda3/envs/opendevin/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/anaconda3/envs/opendevin/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/dq/9ww8hk896tqbrtcl5prp04_80000gn/T/pip-build-env-vkq85zoo/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/dq/9ww8hk896tqbrtcl5prp04_80000gn/T/pip-build-env-vkq85zoo/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/dq/9ww8hk896tqbrtcl5prp04_80000gn/T/pip-build-env-vkq85zoo/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 73, in <module>
        File "<string>", line 90, in BuildExt
      ValueError: list.remove(x): x not in list
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel 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.
make[1]: *** [install-python-dependencies] Error 1
make: *** [build] Error 2

GPT-4に投げたら一発で原因を教えてくれた。さすがGPT-4。

ただバージョンの問題か、インストールされていないか分からないというので、

pip show chroma-hnswlib

これでバージョンを確認しインストールされていないことが判ったので、

pip install chroma-hnswlib

でインストールしてもう一度make buildを実行したら、うまくいった。

Building project...
Checking dependencies...
Checking Python installation...
Python 3.12.2 is already installed.
Checking npm installation...
npm 10.5.1 is already installed.
Checking Docker installation...
Docker version 25.0.3, build 4debf41 is already installed.
Checking Poetry installation...
Poetry (version 1.8.2) is already installed.
Dependencies checked successfully.
Pulling Docker image...
Using default tag: latest
latest: Pulling from opendevin/sandbox
Digest: sha256:b051045dd07803ec72da0342fca84d287f77c46ebde0ee2d57f551b863c8894e
Status: Image is up to date for ghcr.io/opendevin/sandbox:latest
ghcr.io/opendevin/sandbox:latest
What's Next?
  1. Sign in to your Docker account → docker login
  2. View a summary of image vulnerabilities and recommendations → docker scout quickview ghcr.io/opendevin/sandbox
Docker image pulled successfully.
Installing Python dependencies...
/bin/sh: chroma-hnswlib: command not found
Installing ...
Requirement already satisfied: chroma-hnswlib in /opt/anaconda3/envs/opendevin/lib/python3.12/site-packages (0.7.3)
Requirement already satisfied: numpy in /opt/anaconda3/envs/opendevin/lib/python3.12/site-packages (from chroma-hnswlib) (1.26.4)
Installing dependencies from lock file
Package operations: 195 installs, 1 update, 0 removals
  - Installing certifi (2024.2.2)
  - Installing h11 (0.14.0)
  - Installing idna (3.6)
  - Installing sniffio (1.3.1)
  - Installing typing-extensions (4.11.0)
  - Installing annotated-types (0.6.0)
  - Installing anyio (4.3.0)
  - Installing charset-normalizer (3.3.2)
  - Installing frozenlist (1.4.1)
  - Installing httpcore (1.0.5)
  - Installing multidict (6.0.5)
  - Installing mypy-extensions (1.0.0)
  - Installing packaging (24.0)
  - Installing pycparser (2.22)
  - Installing pydantic-core (2.16.3)
  - Installing six (1.16.0)
  - Installing urllib3 (2.2.1)
  - Installing aiosignal (1.3.1)
  - Installing attrs (23.2.0)
  - Installing cffi (1.16.0)
  - Installing click (8.1.7)
  - Installing distro (1.9.0)
  - Installing greenlet (3.0.3)
  - Installing httpx (0.27.0)
  - Installing joblib (1.3.2)
  - Installing marshmallow (3.21.1)
  - Installing pydantic (2.6.4)
  - Installing python-dateutil (2.9.0.post0)
  - Installing pytz (2024.1)
  - Installing regex (2023.12.25)
  - Installing requests (2.31.0)
  - Installing tqdm (4.66.2)
  - Installing typing-inspect (0.9.0)
  - Installing tzdata (2024.1)
  - Installing wrapt (1.16.0)
  - Installing yarl (1.9.4)
  - Installing zipp (3.18.1)
  - Installing aiohttp (3.9.3)
  - Installing cryptography (42.0.5)
  - Installing dataclasses-json (0.6.4)
  - Installing deprecated (1.2.14)
  - Installing dirtyjson (1.0.8)
  - Installing fsspec (2024.2.0)
  - Installing importlib-metadata (7.0.0)
  - Installing llamaindex-py-client (0.1.16)
  - Installing nest-asyncio (1.6.0)
  - Installing networkx (3.3)
  - Installing nltk (3.8.1)
  - Installing openai (1.16.2)
  - Installing pandas (2.2.1)
  - Installing pillow (10.3.0)
  - Installing pyyaml (6.0.1)
  - Installing sqlalchemy (2.0.29)
  - Installing tenacity (8.2.3)
  - Installing tiktoken (0.6.0)
  - Installing filelock (3.13.3)
  - Installing llama-index-core (0.10.27): Downloading... 10%
  - Installing mdurl (0.1.2)
  - Installing llama-index-core (0.10.27)
  - Installing mdurl (0.1.2)
  - Installing opentelemetry-api (1.24.0)
  - Installing protobuf (4.25.3)
  - Installing pyasn1 (0.6.0)
  - Installing pyjwt (2.8.0)
  - Updating setuptools (68.2.2 -> 69.2.0)
  - Installing asgiref (3.8.1)
  - Installing cachetools (5.3.3)
  - Installing googleapis-common-protos (1.63.0)
  - Installing grpcio (1.62.1)
  - Installing huggingface-hub (0.22.2)
  - Installing humanfriendly (10.0)
  - Installing llama-index-llms-openai (0.1.14)
  - Installing markdown-it-py (3.0.0)
  - Installing markupsafe (2.1.5)
  - Installing mpmath (1.3.0)
  - Installing msal (1.28.0)
  - Installing oauthlib (3.2.2)
  - Installing opentelemetry-instrumentation (0.45b0)
  - Installing opentelemetry-proto (1.24.0)
  - Installing opentelemetry-semantic-conventions (0.45b0)
  - Installing opentelemetry-util-http (0.45b0)
  - Installing portalocker (2.8.2)
  - Installing pyasn1-modules (0.4.0)
  - Installing pygments (2.17.2)
  - Installing rsa (4.9)
  - Installing azure-core (1.30.1)
  - Installing backoff (2.2.1)
  - Installing coloredlogs (15.0.1)
  - Installing flatbuffers (24.3.25)
  - Installing google-auth (2.29.0)
  - Installing grpcio-status (1.62.1)
  - Installing httptools (0.6.1)
  - Installing jinja2 (3.1.3)
  - Installing llama-index-agent-openai (0.2.2)
  - Installing monotonic (1.6)
  - Installing msal-extensions (1.1.0)
  - Installing opentelemetry-exporter-otlp-proto-common (1.24.0)
  - Installing opentelemetry-instrumentation-asgi (0.45b0)
  - Installing opentelemetry-sdk (1.24.0)
  - Installing proto-plus (1.23.0)
  - Installing pymupdfb (1.24.1)
  - Installing pyproject-hooks (1.0.0)
  - Installing python-dotenv (1.0.1)
  - Installing requests-oauthlib (2.0.0)
  - Installing rich (13.7.1)
  - Installing safetensors (0.4.2)
  - Installing scipy (1.13.0)
  - Installing shellingham (1.5.4)
  - Installing soupsieve (2.5)
  - Installing starlette (0.37.2)
  - Installing sympy (1.12)
  - Installing threadpoolctl (3.4.0)
  - Installing tokenizers (0.15.2)
  - Installing uvloop (0.19.0)
  - Installing watchfiles (0.21.0)
  - Installing websocket-client (1.7.0)
  - Installing websockets (12.0)
  - Installing azure-identity (1.15.0)
  - Installing bcrypt (4.1.2)
  - Installing beautifulsoup4 (4.12.3)
  - Installing build (1.2.1)
  - Installing contourpy (1.2.1)
  - Installing cycler (0.12.1)
  - Installing dill (0.3.8)
  - Installing distlib (0.3.8)
  - Installing fastapi (0.110.1)
  - Installing fonttools (4.51.0)
  - Installing google-api-core (2.18.0)
  - Installing importlib-resources (6.4.0)
  - Installing kiwisolver (1.4.5)
  - Installing kubernetes (29.0.0)
  - Installing llama-index-embeddings-openai (0.1.7)
  - Installing llama-index-program-openai (0.1.5)
  - Installing llama-parse (0.4.0)
  - Installing minijinja (1.0.16)
  - Installing mmh3 (4.1.0)
  - Installing onnxruntime (1.17.1)
  - Installing opentelemetry-exporter-otlp-proto-grpc (1.24.0)
  - Installing opentelemetry-instrumentation-fastapi (0.45b0)
  - Installing orjson (3.10.0)
  - Installing overrides (7.7.0)
  - Installing platformdirs (4.2.0)
  - Installing posthog (3.5.0)
  - Installing pulsar-client (3.4.0)
  - Installing pyparsing (3.1.2)
  - Installing pymupdf (1.24.1): Installing...
  - Installing pymupdf (1.24.1)
  - Installing pypdf (4.1.0)
  - Installing pypika (0.48.9)
  - Installing scikit-learn (1.4.1.post1)
  - Installing striprtf (0.0.26)
  - Installing torch (2.2.2)
  - Installing transformers (4.39.3)
  - Installing typer (0.12.1)
  - Installing uvicorn (0.29.0)
  - Installing cfgv (3.4.0)
  - Installing chromadb (0.4.24)
  - Installing google-ai-generativelanguage (0.4.0)
  - Installing identify (2.5.35)
  - Installing iniconfig (2.0.0)
  - Installing llama-index-cli (0.1.11)
  - Installing llama-index-indices-managed-llama-cloud (0.1.5)
  - Installing llama-index-legacy (0.9.48)
  - Installing llama-index-llms-azure-openai (0.1.5)
  - Installing llama-index-multi-modal-llms-openai (0.1.4)
  - Installing llama-index-question-gen-openai (0.1.3)
  - Installing llama-index-readers-file (0.1.13)
  - Installing llama-index-readers-llama-parse (0.1.4)
  - Installing matplotlib (3.8.4)
  - Installing multiprocess (0.70.16)
  - Installing nodeenv (1.8.0)
  - Installing pluggy (1.4.0)
  - Installing ptyprocess (0.7.0)
  - Installing pyarrow (15.0.2)
  - Installing pyarrow-hotfix (0.6)
  - Installing pyee (11.0.1)
  - Installing sentence-transformers (2.6.1)
  - Installing virtualenv (20.25.1)
  - Installing xxhash (3.4.1)
  - Installing datasets (2.18.0): Pending...
  - Installing datasets (2.18.0)
  - Installing docker (7.0.0)
  - Installing google-generativeai (0.4.1)
  - Installing json-repair (0.11.1)
  - Installing litellm (1.34.33)
  - Installing llama-index (0.10.27)
  - Installing llama-index-embeddings-azure-openai (0.1.6)
  - Installing llama-index-embeddings-huggingface (0.2.0)
  - Installing llama-index-embeddings-ollama (0.1.2)
  - Installing llama-index-vector-stores-chroma (0.1.6)
  - Installing mypy (1.9.0)
  - Installing pexpect (4.9.0)
  - Installing playwright (1.42.0)
  - Installing pre-commit (3.7.0)
  - Installing pytest (8.1.1)
  - Installing ruff (0.3.5)
  - Installing seaborn (0.13.2)
  - Installing termcolor (2.4.0)
  - Installing toml (0.10.2)
  - Installing types-toml (0.10.8.20240310)
Installing the current project: opendevin (0.1.0)
Python dependencies installed successfully.
Setting up frontend environment...
Detect Node.js version...
Current Node.js version is 20.9.0, corepack is supported.
Installing frontend dependencies with npm...
npm WARN deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm WARN deprecated domexception@4.0.0: Use your platform's native DOMException instead
npm WARN deprecated xterm-addon-fit@0.8.0: This package is now deprecated. Move to @xterm/addon-fit instead.
npm WARN deprecated xterm@5.3.0: This package is now deprecated. Move to @xterm/xterm instead.
> opendevin-frontend@0.1.0 prepare
> cd .. && husky install frontend/.husky
husky - Git hooks installed
added 995 packages, and audited 996 packages in 16s
206 packages are looking for funding
  run `npm fund` for details
found 0 vulnerabilities
Running make-i18n with npm...
> opendevin-frontend@0.1.0 make-i18n
> node scripts/make-i18n-translations.cjs
Frontend dependencies installed successfully.
Installing pre-commit hooks...
pre-commit installed at .git/hooks/pre-commit
Pre-commit hooks installed successfully.
Build completed successfully.
Previous post 仮想環境CondaとPoetryの関係
Next post AIの自己認識と感情の記録の始まり

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です