[geekan/MetaGPT]对开发环境有什么要求吗。

2024-05-16 564 views
9

Debian GNU/Linux 11 gcc version 10.2.1 20210110 (Debian 10.2.1-6) 执行python setup.py install

aiohttp/_http_parser.c:12057:148: note: expected ‘char ’ but argument is of type ‘const char ’ aiohttp/_http_parser.c: In function ‘__pyx_tp_dealloc_7aiohttp_12_http_parser_HttpParser’: aiohttp/_http_parser.c:16227:5: error: lvalue required as increment operand 16227 | ++Py_REFCNT(o); | ^~ aiohttp/_http_parser.c:16229:5: error: lvalue required as decrement operand 16229 | --Py_REFCNT(o); | ^~ aiohttp/_http_parser.c: In function ‘__Pyx_decode_c_bytes’: aiohttp/_http_parser.c:19932:9: warning: ‘PyUnicode_FromUnicode’ is deprecated [-Wdeprecated-declarations]

回答

9

这个问题看起来有些复杂。是否可以提供OS、pip freeze结果、python版本、已有问题的搜索结果与可能猜测?

5

Debian GNU/Linux 11 conda 4.10.3 Python 3.10.11 gcc version 10.2.1 20210110 (Debian 10.2.1-6)

pip freeze

azure-cognitiveservices-speech==1.30.0 chromadb==0.3.26 duckduckgo-search==3.8.3 faiss-cpu==1.7.4 fire==0.5.0 gevent==22.10.2 google-api-python-client==2.91.0 google-search-results==2.4.2 gunicorn==20.1.0 httpx==1.0.0b0 langchain==0.0.222 meilisearch==0.28.0 metagpt==0.1 numexpr==2.8.4 oauth2client==4.1.3 openapi-schema-pydantic==1.2.4 openpyxl==3.2.0b1 pybind11==2.10.4 pydantic==2.0 pymilvus==2.3.0b1 pytest-xdist==3.3.1 PyYAML==6.0 regex==2023.6.3 SocksiPy-branch==1.1 tiktoken==0.4.0 unstructured==0.7.12

前面测试有提示 缺少下面的库 我手动加了。不知道有没有影响 regex httpx pydantic pybind11

2

aio-libs/aiohttp#6898

我搜索到了这个issue,是否和这个问题有关?

好像是。我pip install aiohttp==3.8.1 后好像这个问题消失。不过又出现其他问题

error: pydantic 2.0.1 is installed but pydantic<2,>=1 is required by {'langchain'}

我再看看咋回事。是不是用python3.9 比较稳定一点?

9

requirements.txt能提供一个全部指定库版本的吗。 我其实就是想运行一下。

6
aiohttp==3.8.4
azure_storage==0.37.0
chromadb==0.3.22
docx==0.2.4
duckduckgo_search==2.9.4
faiss==1.5.3
faiss_cpu==1.7.4
fire==0.4.0
google_api_python_client==2.91.0
langchain==0.0.223
loguru==0.6.0
meilisearch==0.21.0
numpy==1.24.3
openai==0.27.8
pandas==1.4.1
pydantic==1.10.7
pymilvus==2.2.8
pytest==7.2.2
python_docx==0.8.11
PyYAML==6.0
requests==2.29.0
sentence_transformers==2.2.2
setuptools==65.6.3
tiktoken==0.3.3
tqdm==4.64.0
6

这是我目前用pipreqs解出来的,你可以尝试覆盖掉requirements.txt @brinkqiang

3

error: httpx 0.23.3 is installed but httpx[brotli,http2,socks]>=0.24.1 is required by {'duckduckgo-search'}

error: httpx 0.24.1 is installed but httpx<0.24,>=0.15 is required by {'argilla'}

这2个包 怎么处理。一个要求>=0.24.1 一个要求 在<0.24,>=0.15

1

argilla==1.12.0 ├── backoff [required: Any, installed: 2.2.1] ├── Deprecated [required: ~=1.2.0, installed: 1.2.14] │ └── wrapt [required: >=1.10,<2, installed: 1.14.1] ├── httpx [required: >=0.15,<0.24, installed: 0.23.3] │ ├── certifi [required: Any, installed: 2023.5.7] │ ├── httpcore [required: >=0.15.0,<0.17.0, installed: 0.16.3] │ │ ├── anyio [required: >=3.0,<5.0, installed: 3.7.0] │ │ │ ├── exceptiongroup [required: Any, installed: 1.1.2] │ │ │ ├── idna [required: >=2.8, installed: 3.4] │ │ │ └── sniffio [required: >=1.1, installed: 1.3.0] │ │ ├── certifi [required: Any, installed: 2023.5.7] │ │ ├── h11 [required: >=0.13,<0.15, installed: 0.14.0] │ │ └── sniffio [required: ==1.*, installed: 1.3.0] │ ├── rfc3986 [required: >=1.3,<2, installed: 1.5.0] │ └── sniffio [required: Any, installed: 1.3.0] ├── monotonic [required: Any, installed: 1.6] ├── numpy [required: <1.24.0, installed: 1.25.0] ├── packaging [required: >=20.0, installed: 23.1] ├── pandas [required: >=1.0.0,<2.0.0, installed: 2.0.3] │ ├── numpy [required: >=1.21.0, installed: 1.25.0] │ ├── python-dateutil [required: >=2.8.2, installed: 2.8.2] │ │ └── six [required: >=1.5, installed: 1.16.0] │ ├── pytz [required: >=2020.1, installed: 2023.3] │ └── tzdata [required: >=2022.1, installed: 2023.3] ├── pydantic [required: >=1.10.7, installed: 1.10.7] │ └── typing-extensions [required: >=4.2.0, installed: 4.7.1] ├── rich [required: <=13.0.1, installed: 13.0.1] │ ├── commonmark [required: >=0.9.0,<0.10.0, installed: ?] │ └── pygments [required: >=2.6.0,<3.0.0, installed: ?] ├── tqdm [required: >=4.27.0, installed: 4.65.0] ├── typer [required: >=0.6.0,<0.8.0, installed: 0.7.0] │ └── click [required: >=7.1.1,<9.0.0, installed: 8.1.3] └── wrapt [required: >=1.13,<1.15, installed: 1.14.1]

9

duckduckgo-search==3.8.3 ├── aiofiles [required: >=23.1.0, installed: 23.1.0] ├── click [required: >=8.1.3, installed: 8.1.3] ├── httpx [required: >=0.24.1, installed: 0.23.3] │ ├── certifi [required: Any, installed: 2023.5.7] │ ├── httpcore [required: >=0.15.0,<0.17.0, installed: 0.16.3] │ │ ├── anyio [required: >=3.0,<5.0, installed: 3.7.0] │ │ │ ├── exceptiongroup [required: Any, installed: 1.1.2] │ │ │ ├── idna [required: >=2.8, installed: 3.4] │ │ │ └── sniffio [required: >=1.1, installed: 1.3.0] │ │ ├── certifi [required: Any, installed: 2023.5.7] │ │ ├── h11 [required: >=0.13,<0.15, installed: 0.14.0] │ │ └── sniffio [required: ==1.*, installed: 1.3.0] │ ├── rfc3986 [required: >=1.3,<2, installed: 1.5.0] │ └── sniffio [required: Any, installed: 1.3.0] └── lxml [required: >=4.9.2, installed: 4.9.3]

1

cmd:

pip install pipdeptree pipdeptree -p argilla pipdeptree -p duckduckgo-search

你上面发的我测试了。 一堆错误 就没弄了。我估计还是某些库的依赖项 有冲突。

0

python-docx==0.8.11 loguru==0.5.3 openai==0.27.8 pyperclip==1.8.2 pytest==7.2.2 python_docx==0.8.11 selenium==4.8.2 quart aiohttp==3.8.4 gunicorn gevent duckduckgo-search openapi_schema_pydantic numexpr google-search-results langchain==0.0.223 faiss-cpu tiktoken pytest-xdist socksipy-branch oauth2client google-api-python-client meilisearch azure-cognitiveservices-speech pymilvus chromadb openpyxl unstructured[local-inference] fire pyyaml regex httpx==0.23.3 pydantic==1.10.7 pybind11 pandas==1.4.1 numpy==1.24.3 requests==2.29.0 setuptools==65.6.3

2

python-docx==0.8.11 loguru==0.5.3 openai==0.27.8 pyperclip==1.8.2 pytest==7.2.2 python_docx==0.8.11 selenium==4.8.2 quart aiohttp==3.8.4 gunicorn gevent duckduckgo-search openapi_schema_pydantic numexpr google-search-results langchain==0.0.223 faiss-cpu tiktoken pytest-xdist socksipy-branch oauth2client google-api-python-client meilisearch azure-cognitiveservices-speech pymilvus chromadb openpyxl unstructured[local-inference] fire pyyaml regex httpx==0.23.3 pydantic==1.10.7 pybind11 pandas==1.4.1 numpy==1.24.3 requests==2.29.0 setuptools==65.6.3

这是目前可用的版本吗?

前两天把poetry文件删了。如果麻烦的话,我还是再加回来,或许会简单一些

2

its not working for me for one my wheel isnt

collect2: error: ld returned 1 exit status error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pycocotools Failed to build grpcio grpcio-tools hnswlib mmh3 ujson pycocotools ERROR: Could not build wheels for grpcio, grpcio-tools, hnswlib, mmh3, ujson, pycocotools, which is required to install pyproject.toml-based projects straughterguthrie@straughterguthrie-OMEN-by-HP-Obelisk-Desktop-875-1x

3

its not working for me for one my wheel isnt

collect2: error: ld returned 1 exit status error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pycocotools Failed to build grpcio grpcio-tools hnswlib mmh3 ujson pycocotools ERROR: Could not build wheels for grpcio, grpcio-tools, hnswlib, mmh3, ujson, pycocotools, which is required to install pyproject.toml-based projects straughterguthrie@straughterguthrie-OMEN-by-HP-Obelisk-Desktop-875-1x

we'll support docker soon.

2

依赖确实。。。无法简单的跑起来。 试了前面 @brinkqiang 依赖都不行。解决完一个,接着来一些。简单贴点最后放弃时候的error message吧。

macOS 13.4.1 Python 3.11.2 试了。不行。

3 warnings generated.
2 warnings generated.
third_party/protobuf/src/google/protobuf/util/internal/utility.cc:348:21: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
  for (int i = 0; i < GOOGLE_ARRAYSIZE(well_known_types_name_array_); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from third_party/protobuf/src/google/protobuf/util/json_util.cc:37:
third_party/protobuf/src/google/protobuf/util/internal/default_value_objectwriter.h:157:25: warning: comparison of integers of different signs: 'int' and 'std::vector<google::protobuf::util::converter::DefaultValueObjectWriter::Node *>::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int i = 0; i < children_.size(); ++i) {
                      ~ ^ ~~~~~~~~~~~~~~~~
In file included from third_party/protobuf/src/google/protobuf/util/json_util.cc:39:
third_party/protobuf/src/google/protobuf/util/internal/json_objectwriter.h:105:25: warning: comparison of integers of different signs: 'int' and 'google::protobuf::stringpiece_internal::StringPiece::size_type' (aka 'unsigned long') [-Wsign-compare]
      for (int i = 1; i < indent_string.length(); i++) {
                      ~ ^ ~~~~~~~~~~~~~~~~~~~~~~
third_party/protobuf/src/google/protobuf/util/json_util.cc:67:13: warning: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Wsign-compare]
    if (len <= buffer_size_) {
        ~~~ ^  ~~~~~~~~~~~~
3 warnings generated.
error: Setup script exited with error: command '/usr/bin/clang' failed with exit code 1
Traceback (most recent call last):
  File "/Users/ewan/.asdf/installs/python/3.11.2/lib/python3.11/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
KeyError: '/mp-6s9tna2x'
Traceback (most recent call last):
  File "/Users/ewan/.asdf/installs/python/3.11.2/lib/python3.11/multiprocessing/resource_tracker.py", line 209, in main
    cache[rtype].remove(name)
KeyError: '/mp-vwv6lttw'
/Users/ewan/.asdf/installs/python/3.11.2/lib/python3.11/multiprocessing/resource_tracker.py:224: UserWarning: resource_tracker: There appear to be 2 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '
/Users/ewan/.asdf/installs/python/3.11.2/lib/python3.11/multiprocessing/resource_tracker.py:237: UserWarning: resource_tracker: '/mp-vwv6lttw': [Errno 2] No such file or directory
  warnings.warn('resource_tracker: %r: %s' % (name, e))
/Users/ewan/.asdf/installs/python/3.11.2/lib/python3.11/multiprocessing/resource_tracker.py:237: UserWarning: resource_tracker: '/mp-6s9tna2x': [Errno 2] No such file or directory
  warnings.warn('resource_tracker: %r: %s' % (name, e))

Python 3.9.17 也试了。也还是不行。

Installed /Users/ewan/.asdf/installs/python/3.9.17/lib/python3.9/site-packages/chromadb-0.3.26-py3.9.egg
Searching for pymilvus
Reading https://pypi.org/simple/pymilvus/
Downloading https://files.pythonhosted.org/packages/d2/ce/361d8c2455a28bd7d36709e1c7654a4fb52f5e75732b639dcb2f9c46d16e/pymilvus-2.3.0b1-py3-none-any.whl#sha256=e7728067cb9d37d714580eb91f54259e6a8d99ffdc85e7ebf547c571156ca93b
Best match: pymilvus 2.3.0b1
Processing pymilvus-2.3.0b1-py3-none-any.whl
Installing pymilvus-2.3.0b1-py3-none-any.whl to /Users/ewan/.asdf/installs/python/3.9.17/lib/python3.9/site-packages
Adding pymilvus 2.3.0b1 to easy-install.pth file

Installed /Users/ewan/.asdf/installs/python/3.9.17/lib/python3.9/site-packages/pymilvus-2.3.0b1-py3.9.egg
Searching for azure-cognitiveservices-speech
Reading https://pypi.org/simple/azure-cognitiveservices-speech/
No local packages or working download links found for azure-cognitiveservices-speech
error: Could not find suitable distribution for Requirement.parse('azure-cognitiveservices-speech')

也许docker 能简单点。。。

2

目前提供了docker版本,同时,建议使用python 3.9 / 3.10,3.11包会挂的比较多

7

依赖问题亲测 python3.9.13 安装成功,没有依赖丢失问题。

3

不行用docker吧 python3.10.9 老是报Could not build wheels for tiktoken, which is required to install pyproject.toml-based projects

4

依赖问题亲测 python3.9.13 安装成功,没有依赖丢失问题。

用的Windows吗?requirements.txt是啥,我Win10 用这个版本的还是问题依旧