ai - 失败 - loongnix不支持 use qwq agent in loognix
访问量: 2
refer to: https://github.com/QwenLM/Qwen-Agent
内核太低了无法编译rust1.54.x-导致python3库很多无法安装
1. clone code to /workspace/Qwen-Agent
2. get python from docker:
docker pull cr.loongnix.cn/library/python:3.10.16
don't use asdf's python, which is broken, can not use ssl ( pip install 403.. )
3. start http proxy in your host.
3.1 start trojan at 1078
3.2 start privoxy at 8078, allow 0.0.0.0 ip access
3.3 run docker:
docker run -d -v /workspace/Qwen-Agent:/opt/app/qwen_agent -it cr.loongnix.cn/library/python:3.10.16 tail -f /dev/null
3.4 in your docker , set proxy:
echo 'remember to start privoxy: $ systemctl start privoxy'
export HTTP_PROXY="http://host_ip:8118"
export HTTPS_PROXY="http://host_ip:8118"
export http_proxy="http://host_ip:8118"
export https_proxy="http://host_ip:8118"
3.5 in docker:
apt update
apt install -y cmake build-essential gcc g++ python3-dev
apt-get install -y --no-install-recommends \
autoconf bison build-essential \
libssl-dev libreadline-dev zlib1g-dev \
libyaml-dev libncurses5-dev libffi-dev \
libgdbm-dev libdb-dev wget ( jiu an zhuang ba! )
apt install libssl-dev libcurl4-openssl-dev zlib
apt install -y autoconf automake libtool make g++ pkg-config cmake patchelf ninja-build python3-dev
3.6
install numpy ( versions: numpy (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1, 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0, 1.23.1, 1.23.2, 1.23.3, 1.23.4, 1.23.5, 1.24.0, 1.24.1, 1.24.2, 1.24.3, 1.24.4, 1.25.0, 1.25.1, 1.25.2, 1.26.0, 1.26.1, 1.26.2, 1.26.3, 1.26.4, 2.0.0, 2.0.1, 2.0.2, 2.1.0rc1, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0rc1, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4)
loongnix GCC: 8.3
install dashscope: 1.17.0
(DO NOT) apt install rustc (because the version is 1.47.x , too low, need 1.56+ )
3.6 in docker, install rustc, rust and related stuff:
https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#quick-start
(DO NOT use: ) git clone https://github.com/rust-lang/rust.git ( need about 2G space)
git clone --depth 1 https://github.com/rust-lang/rust.git
(objects: 50203)
cd rust
./x build ( refer to:
4. in
pip install -e ./"[gui,rag,code_interpreter,python_executor]"
jixu.
maturin:
WARNING: qwen-agent 0.0.16 does not provide the extra 'mcp'
Collecting pydantic>=2.3.0 (from qwen-agent==0.0.16)
Obtaining dependency information for pydantic>=2.3.0 from https://files.pythonhosted.org/packages/df/e4/ba44652d562cbf0bf320e0f3810206149c8a4e99cdbf66da82e97ab53a15/pydantic-2.9.2-py3-none-any.whl.metadata
Using cached pydantic-2.9.2-py3-none-any.whl.metadata (149 kB)
Collecting pydantic-core==2.23.4 (from qwen-agent==0.0.16)
Using cached pydantic_core-2.23.4.tar.gz (402 kB)
Running command pip subprocess to install build dependencies
Using pip 25.0.1 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)
Collecting maturin<2,>=1
Using cached maturin-1.8.3.tar.gz (199 kB)
Installing build dependencies: started
Running command pip subprocess to install build dependencies
Using pip 25.0.1 from /usr/local/lib/python3.10/site-packages/pip (python 3.10)
Collecting setuptools
Obtaining dependency information for setuptools from https://files.pythonhosted.org/packages/54/21/f43f0a1fa8b06b32812e0975981f4677d28e0f3271601dc88ac5a5b83220/setuptools-78.1.0-py3-none-any.whl.metadata
Using cached setuptools-78.1.0-py3-none-any.whl.metadata (6.6 kB)
Collecting wheel>=0.36.2
Obtaining dependency information for wheel>=0.36.2 from https://files.pythonhosted.org/packages/0b/2c/87f3254fd8ffd29e4c02732eee68a83a1d3c346ae39bc6822dcbcb697f2b/wheel-0.45.1-py3-none-any.whl.metadata
Using cached wheel-0.45.1-py3-none-any.whl.metadata (2.3 kB)
Collecting tomli>=1.1.0
Obtaining dependency information for tomli>=1.1.0 from https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl.metadata
Using cached tomli-2.2.1-py3-none-any.whl.metadata (10 kB)
Collecting setuptools-rust>=1.4.0
Obtaining dependency information for setuptools-rust>=1.4.0 from https://files.pythonhosted.org/packages/ff/b4/a33bf0ff6216219285e0693d6c9d2fd41655cf4f951573107aa332969a78/setuptools_rust-1.11.0-py3-none-any.whl.metadata
Using cached setuptools_rust-1.11.0-py3-none-any.whl.metadata (9.2 kB)
Collecting semantic_version<3,>=2.8.2 (from setuptools-rust>=1.4.0)
Obtaining dependency information for semantic_version<3,>=2.8.2 from https://files.pythonhosted.org/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl.metadata
Using cached semantic_version-2.10.0-py2.py3-none-any.whl.metadata (9.7 kB)
Using cached setuptools-78.1.0-py3-none-any.whl (1.3 MB)
Using cached wheel-0.45.1-py3-none-any.whl (72 kB)
Using cached tomli-2.2.1-py3-none-any.whl (14 kB)
Using cached setuptools_rust-1.11.0-py3-none-any.whl (27 kB)
Using cached semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Installing collected packages: wheel, tomli, setuptools, semantic_version, setuptools-rust
Creating /tmp/pip-build-env-s8o3qyng/overlay/bin
changing mode of /tmp/pip-build-env-s8o3qyng/overlay/bin/wheel to 755
Successfully installed semantic_version-2.10.0 setuptools-78.1.0 setuptools-rust-1.11.0 tomli-2.2.1 wheel-0.45.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Running command Getting requirements to build wheel
/tmp/pip-build-env-s8o3qyng/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
By 2026-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
corresp(dist, value, root_dir)
running egg_info
creating maturin.egg-info
writing maturin.egg-info/PKG-INFO
writing dependency_links to maturin.egg-info/dependency_links.txt
writing requirements to maturin.egg-info/requires.txt
writing top-level names to maturin.egg-info/top_level.txt
writing manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.json' under directory 'src/python_interpreter'
writing manifest file 'maturin.egg-info/SOURCES.txt'
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Running command Preparing metadata (pyproject.toml)
/tmp/pip-build-env-s8o3qyng/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
By 2026-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
corresp(dist, value, root_dir)
running dist_info
creating /tmp/pip-modern-metadata-1ea94wtm/maturin.egg-info
writing /tmp/pip-modern-metadata-1ea94wtm/maturin.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-modern-metadata-1ea94wtm/maturin.egg-info/dependency_links.txt
writing requirements to /tmp/pip-modern-metadata-1ea94wtm/maturin.egg-info/requires.txt
writing top-level names to /tmp/pip-modern-metadata-1ea94wtm/maturin.egg-info/top_level.txt
writing manifest file '/tmp/pip-modern-metadata-1ea94wtm/maturin.egg-info/SOURCES.txt'
reading manifest file '/tmp/pip-modern-metadata-1ea94wtm/maturin.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.json' under directory 'src/python_interpreter'
writing manifest file '/tmp/pip-modern-metadata-1ea94wtm/maturin.egg-info/SOURCES.txt'
creating '/tmp/pip-modern-metadata-1ea94wtm/maturin-1.8.3.dist-info'
Preparing metadata (pyproject.toml): finished with status 'done'
Collecting typing-extensions!=4.7.0,>=4.6.0
Obtaining dependency information for typing-extensions!=4.7.0,>=4.6.0 from https://files.pythonhosted.org/packages/e0/86/39b65d676ec5732de17b7e3c476e45bb80ec64eb50737a8dce1a4178aba1/typing_extensions-4.13.0-py3-none-any.whl.metadata
Using cached typing_extensions-4.13.0-py3-none-any.whl.metadata (3.0 kB)
Collecting tomli>=1.1.0 (from maturin<2,>=1)
Obtaining dependency information for tomli>=1.1.0 from https://files.pythonhosted.org/packages/6e/c2/61d3e0f47e2b74ef40a68b9e6ad5984f6241a942f7cd3bbfbdbd03861ea9/tomli-2.2.1-py3-none-any.whl.metadata
Using cached tomli-2.2.1-py3-none-any.whl.metadata (10 kB)
Using cached typing_extensions-4.13.0-py3-none-any.whl (45 kB)
Using cached tomli-2.2.1-py3-none-any.whl (14 kB)
Building wheels for collected packages: maturin
Building wheel for maturin (pyproject.toml): started
Running command Building wheel for maturin (pyproject.toml)
/tmp/pip-build-env-s8o3qyng/overlay/lib/python3.10/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
By 2026-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
corresp(dist, value, root_dir)
running bdist_wheel
running build
running build_py
creating build/lib.linux-loongarch64-cpython-310/maturin
copying maturin/__init__.py -> build/lib.linux-loongarch64-cpython-310/maturin
copying maturin/__main__.py -> build/lib.linux-loongarch64-cpython-310/maturin
running egg_info
writing maturin.egg-info/PKG-INFO
writing dependency_links to maturin.egg-info/dependency_links.txt
writing requirements to maturin.egg-info/requires.txt
writing top-level names to maturin.egg-info/top_level.txt
reading manifest file 'maturin.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.json' under directory 'src/python_interpreter'
writing manifest file 'maturin.egg-info/SOURCES.txt'
running build_ext
running build_rust
error: failed to parse manifest at `/tmp/pip-install-g0htujuf/maturin_f2ee5168c5364b529a38d2035cd04fb5/Cargo.toml`
Caused by:
failed to parse the `edition` key
Caused by:
supported edition values are `2015` or `2018`, but `2021` is unknown
wget https://pypi.loongnix.cn/loongson/pypi/+f/062/6a4a1d42b58f6/maturin-1.8.3-cp310-cp310-linux_loongarch64.whl#sha256=0626a4a1d42b58f60be9f9eebfdf078a1621deb2120b99da203e27bffe8a5ad2
pip install maturin-1.8.3-cp310-cp310-linux_loongarch64.whl
don't use rustc , just download from this pypi.loongnix.cn
pip install pandas==2.0.3
pydantic:
https://github.com/pydantic/pydantic
https://github.com/pydantic/pydantic
https://github.com/pydantic/pydantic
Using cached python_pptx-1.0.2-py3-none-any.whl.metadata (2.5 kB)
Collecting tabulate (from qwen-agent==0.0.16)
Obtaining dependency information for tabulate from https://files.pythonhosted.org/packages/40/44/4a5f08c96eb108af5cb50b41f76142f0afa346dfa99d5296fe7202a11854/tabulate-0.9.0-py3-none-any.w
Using cached tabulate-0.9.0-py3-none-any.whl.metadata (34 kB)
INFO: pip is looking at multiple versions of qwen-agent[code-interpreter,gui,mcp,rag] to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install None and qwen-agent[code-interpreter,gui,mcp,rag]==0.0.16 because these package versions have conflicting dependencies.
The conflict is caused by:
qwen-agent 0.0.16 depends on pydantic>=2.3.0
qwen-agent[code-interpreter,gui,mcp,rag] 0.0.16 depends on pydantic>=2.3.0
qwen-agent[code-interpreter,gui,mcp,rag] 0.0.16 depends on pydantic==1.9.1
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip to attempt to solve the dependency conflict