Langchain-Chatchat
Langchain-Chatchat copied to clipboard
希望出一个macos m2的安装教程
mac m2安装,模型加载成功了,知识库文件也上传成功了,但是一问答就会报错,报错内容如下
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/gradio/routes.py", line 437, in run_predict
output = await app.get_blocks().process_api(
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/gradio/blocks.py", line 1346, in process_api
result = await self.call_function(
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/gradio/blocks.py", line 1090, in call_function
prediction = await utils.async_iteration(iterator)
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/gradio/utils.py", line 341, in async_iteration
return await iterator.__anext__()
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/gradio/utils.py", line 334, in __anext__
return await anyio.to_thread.run_sync(
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/anyio/to_thread.py", line 33, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread
return await future
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 807, in run
result = context.run(func, *args)
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/gradio/utils.py", line 317, in run_sync_iterator_async
return next(iterator)
File "/Users/tangjianghua5/projects/ai/langchain-ChatGLM/webui.py", line 55, in get_answer
for resp, history in local_doc_qa.get_knowledge_based_answer(
File "/Users/tangjianghua5/projects/ai/langchain-ChatGLM/chains/local_doc_qa.py", line 227, in get_knowledge_based_answer
related_docs_with_score = vector_store.similarity_search_with_score(query, k=self.top_k)
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/langchain/vectorstores/faiss.py", line 245, in similarity_search_with_score
docs = self.similarity_search_with_score_by_vector(
TypeError: MyFAISS.similarity_search_with_score_by_vector() got an unexpected keyword argument 'filter'
我也是一样,我也是mac arm架构的
mac arm安装报错求大神帮助:
$ pip install --use-pep517 -r requirements.txt
Building wheels for collected packages: onnx
Building wheel for onnx (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for onnx (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [86 lines of output]
fatal: not a git repository (or any of the parent directories): .git
running bdist_wheel
running build
running build_py
running create_version
running cmake_build
Using cmake args: ['/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/bin/cmake', '-DPYTHON_INCLUDE_DIR=/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/include/python3.10', '-DPYTHON_EXECUTABLE=/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/bin/python', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-310-darwin.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-install-hf8luq8_/onnx_a7831cd3a4664f3098b93458710ac2c7']
-- The C compiler identification is AppleClang 14.0.3.14030022
-- The CXX compiler identification is AppleClang 14.0.3.14030022
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/bin/python (found version "3.10.11")
-- Found PythonLibs: /Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/libpython3.10.dylib (found version "3.10.11")
Generated: /private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-install-hf8luq8_/onnx_a7831cd3a4664f3098b93458710ac2c7/.setuptools-cmake-build/onnx/onnx-ml.proto
CMake Error at CMakeLists.txt:299 (message):
Protobuf compiler not found
Call Stack (most recent call first):
CMakeLists.txt:330 (relative_protobuf_generate_cpp)
-- Configuring incomplete, errors occurred!
See also "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-install-hf8luq8_/onnx_a7831cd3a4664f3098b93458710ac2c7/.setuptools-cmake-build/CMakeFiles/CMakeOutput.log".
See also "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-install-hf8luq8_/onnx_a7831cd3a4664f3098b93458710ac2c7/.setuptools-cmake-build/CMakeFiles/CMakeError.log".
Traceback (most recent call last):
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 416, in build_wheel
return self._build_with_temp_dir(['bdist_wheel'], '.whl',
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir
self.run_setup()
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 332, in <module>
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
return run_commands(dist)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
dist.run_commands()
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
self.run_command(cmd)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 343, in run
self.run_command("build")
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 131, in run
self.run_command(cmd_name)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 223, in run
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command
super().run_command(command)
File "/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-build-env-bgidsg72/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
cmd_obj.run()
File "<string>", line 209, in run
File "/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/lib/python3.10/subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/bin/cmake', '-DPYTHON_INCLUDE_DIR=/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/include/python3.10', '-DPYTHON_EXECUTABLE=/Users/tangjianghua5/miniconda3/envs/langchain-ChatGLM/bin/python', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-310-darwin.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/private/var/folders/tc/3lqshyjx3d5bsfvxdlbsm2g00000gp/T/pip-install-hf8luq8_/onnx_a7831cd3a4664f3098b93458710ac2c7']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for onnx
Failed to build onnx
ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects
安装没有报错,执行python cli_demo.py报错 python cli_demo.py INFO 2023-06-14 14:58:51,880-1d: loading model config llm device: mps embedding device: mps dir: /Users/wyb/Projects/ai/langchain-ChatGLM flagging username: b2bc852c79c74ce98c6baca5acc8b2e1
INFO 2023-06-14 14:59:04,244-1d: NumExpr defaulting to 8 threads.
/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/pkg_resources/init.py:121: DeprecationWarning: pkg_resources is deprecated as an API
warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('zope').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/lmdb/pycache/lmdb_cffi.c:267:14: fatal error: 'lmdb.h' file not found
#include "lmdb.h"
^~~~~~~~
1 error generated.
Traceback (most recent call last):
File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/lmdb/init.py", line 42, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn raise DistutilsExecError( distutils.errors.DistutilsExecError: command '/usr/bin/clang' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/cffi/ffiplatform.py", line 51, in _build dist.run_command('build_ext') File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run self.build_extensions() File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions _build_ext.build_ext.build_extensions(self) File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions self._build_extensions_serial() File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial self.build_extension(ext) File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 246, in build_extension _build_ext.build_extension(self, ext) File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension objects = self.compiler.compile( File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py", line 600, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/Users/wyb/miniconda3/envs/lc-glm/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py", line 187, in _compile raise CompileError(msg) distutils.errors.CompileError: command '/usr/bin/clang' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/wyb/Projects/ai/langchain-ChatGLM/cli_demo.py", line 2, in
langchain版本不对,按照requirements.txt的版本装
我M2成功运行了,不过出文字速度感人
咋搞的兄弟
langchain版本不对,按照requirements.txt的版本装
Mac M1的一直提示模型未加载成功,点击对话,就报AttributeError: 'NoneType' object has no attribute 'int4WeightExtractionHalf'这个异常,也是因为都要按照requirements的安装吗?我看介绍Mac的torch不是要安装night版本的吗?
langchain版本不对,按照requirements.txt的版本装
Mac M1的一直提示模型未加载成功,点击对话,就报AttributeError: 'NoneType' object has no attribute 'int4WeightExtractionHalf'这个异常,也是因为都要按照requirements的安装吗?我看介绍Mac的torch不是要安装night版本的吗?
没有遇到这个错误,优先按照requirements安装。 但是q5.1的LLaMA 7秒出一个token,你再考虑一下还有没有继续搞的必要...
(aifin) huangying@MacBook-Pro-2 aifin % python api.py INFO 2023-07-05 19:25:26,058-1d: loading model config llm device: mps embedding device: cpu dir: /Users/huangying/PycharmProjects/aifin flagging username: 617558d9d64b46728a67b2bbc80f1091
/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/pkg_resources/init.py:121: DeprecationWarning: pkg_resources is deprecated as an API
warnings.warn("pkg_resources is deprecated as an API", DeprecationWarning)
/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google.logging').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/pkg_resources/init.py:2349: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('google').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(parent)
/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/pkg_resources/init.py:2870: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('zope').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)
/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/lmdb/pycache/lmdb_cffi.c:267:14: fatal error: 'lmdb.h' file not found
#include "lmdb.h"
^~~~~~~~
1 error generated.
Traceback (most recent call last):
File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/lmdb/init.py", line 42, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn raise DistutilsExecError( distutils.errors.DistutilsExecError: command '/usr/bin/clang' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/cffi/ffiplatform.py", line 51, in _build dist.run_command('build_ext') File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/dist.py", line 1244, in run_command super().run_command(command) File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 988, in run_command cmd_obj.run() File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run self.build_extensions() File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions _build_ext.build_ext.build_extensions(self) File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions self._build_extensions_serial() File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial self.build_extension(ext) File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 246, in build_extension _build_ext.build_extension(self, ext) File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 548, in build_extension objects = self.compiler.compile( File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/ccompiler.py", line 600, in compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/Users/huangying/miniconda3/envs/aifin/lib/python3.10/site-packages/setuptools/_distutils/unixccompiler.py", line 187, in _compile raise CompileError(msg) distutils.errors.CompileError: command '/usr/bin/clang' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/huangying/PycharmProjects/aifin/api.py", line 17, in
你们是用docker安装的吗?
docker image inspect registry.cn-beijing.aliyuncs.com/chatchat/chatchat:0.2.0,我看这个镜像只支持amd吧。
langchain版本不对,按照requirements.txt的版本装
Mac M1的一直提示模型未加载成功,点击对话,就报AttributeError: 'NoneType' object has no attribute 'int4WeightExtractionHalf'这个异常,也是因为都要按照requirements的安装吗?我看介绍Mac的torch不是要安装night版本的吗?
我也是,如何解决