Langchain-Chatchat icon indicating copy to clipboard operation
Langchain-Chatchat copied to clipboard

[求助] pip install -r requirements.txt 的时候出现以下报错。。。有大佬帮忙看看怎么搞么,下的release里面的包

Open minlo-18 opened this issue 1 year ago • 7 comments

$ pip install -r requirements.txt Collecting detectron2@ git+https://github.com/facebookresearch/[email protected]#egg=detectron2 (from -r requirements.txt (line 12)) Cloning https://github.com/facebookresearch/detectron2.git (to revision v0.6) to c:\users\admin\appdata\local\temp\pip-install-p8h2uiow\detectron2_a0d376616af64205afb7897356576fd6 Running command git clone --filter=blob:none --quiet https://github.com/facebookresearch/detectron2.git 'C:\Users\admin\AppData\Local\Temp\pip-install-p8h2uiow\detectron2_a0d376616af64205afb7897356576fd6' Running command git checkout -q d1e04565d3bec8719335b88be9e9b961bf3ec464 Resolved https://github.com/facebookresearch/detectron2.git to commit d1e04565d3bec8719335b88be9e9b961bf3ec464 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' error: subprocess-exited-with-error

Getting requirements to build wheel did not run successfully. exit code: 1

[21 lines of output] Traceback (most recent call last): File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires self.run_setup() File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 485, in run_setup self).run_setup(setup_script=setup_script) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup exec(code, locals()) File "", line 10, in ModuleNotFoundError: No module named 'torch' [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.

minlo-18 avatar Apr 18 '23 14:04 minlo-18

detectron2 可以不装,只会影响 pdf 扫描文件读取

minlo-18 @.***>于2023年4月18日 周二22:33写道:

$ pip install -r requirements.txt Collecting detectron2@ git+ @.***#egg=detectron2 (from -r requirements.txt (line 12)) Cloning https://github.com/facebookresearch/detectron2.git (to revision v0.6) to c:\users\admin\appdata\local\temp\pip-install-p8h2uiow\detectron2_a0d376616af64205afb7897356576fd6 Running command git clone --filter=blob:none --quiet https://github.com/facebookresearch/detectron2.git 'C:\Users\admin\AppData\Local\Temp\pip-install-p8h2uiow\detectron2_a0d376616af64205afb7897356576fd6' Running command git checkout -q d1e04565d3bec8719335b88be9e9b961bf3ec464 Resolved https://github.com/facebookresearch/detectron2.git to commit d1e04565d3bec8719335b88be9e9b961bf3ec464 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' error: subprocess-exited-with-error

Getting requirements to build wheel did not run successfully. exit code: 1

[21 lines of output] Traceback (most recent call last): File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires self.run_setup() File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 485, in run_setup self).run_setup(setup_script=setup_script) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup exec(code, locals()) File "", line 10, in ModuleNotFoundError: No module named 'torch' [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.

— Reply to this email directly, view it on GitHub https://github.com/imClumsyPanda/langchain-ChatGLM/issues/134, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLH5EQITMFACSOOAQLG7Q3XB2Q4RANCNFSM6AAAAAAXCXFFPQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

imClumsyPanda avatar Apr 18 '23 15:04 imClumsyPanda

detectron2 可以不装,只会影响 pdf 扫描文件读取 minlo-18 @.>于2023年4月18日 周二22:33写道: $ pip install -r requirements.txt Collecting detectron2@ git+ @.#egg=detectron2 (from -r requirements.txt (line 12)) Cloning https://github.com/facebookresearch/detectron2.git (to revision v0.6) to c:\users\admin\appdata\local\temp\pip-install-p8h2uiow\detectron2_a0d376616af64205afb7897356576fd6 Running command git clone --filter=blob:none --quiet https://github.com/facebookresearch/detectron2.git 'C:\Users\admin\AppData\Local\Temp\pip-install-p8h2uiow\detectron2_a0d376616af64205afb7897356576fd6' Running command git checkout -q d1e04565d3bec8719335b88be9e9b961bf3ec464 Resolved https://github.com/facebookresearch/detectron2.git to commit d1e04565d3bec8719335b88be9e9b961bf3ec464 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' error: subprocess-exited-with-error Getting requirements to build wheel did not run successfully. exit code: 1 [21 lines of output] Traceback (most recent call last): File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in _get_build_requires self.run_setup() File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 485, in run_setup self).run_setup(setup_script=setup_script) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Temp\pip-build-env-j1vckziz\overlay\Lib\site-packages\setuptools\build_meta.py", line 335, in run_setup exec(code, locals()) File "", line 10, in ModuleNotFoundError: No module named 'torch' [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. — Reply to this email directly, view it on GitHub <#134>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLH5EQITMFACSOOAQLG7Q3XB2Q4RANCNFSM6AAAAAAXCXFFPQ . You are receiving this because you are subscribed to this thread.Message ID: @.*>

这个问题解决了 但是又遇到了新的问题 模型未加载成功,重新加载会出现这样的报错 Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. 'list' object has no attribute 'endswith'

minlo-18 avatar Apr 18 '23 16:04 minlo-18

Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. 'list' object has no attribute 'endswith' Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. 'list' object has no attribute 'endswith' Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. 'list' object has no attribute 'endswith' Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. No compiled kernel found. Compiling kernels : C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4\quantization_kernels_parallel.c Compiling gcc -O3 -fPIC -pthread -fopenmp -std=c99 C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4\quantization_kernels_parallel.c -shared -o C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4\quantization_kernels_parallel.so 'gcc' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 Compile failed, using default cpu kernel code. Compiling gcc -O3 -fPIC -std=c99 C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4\quantization_kernels.c -shared -o C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4\quantization_kernels.so 'gcc' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 Kernels compiled : C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4\quantization_kernels.so Cannot load cpu kernel, don't use quantized model on cpu. Using quantization cache Applying quantization to glm layers module transformers has no attribute TFChatGLMForConditionalGeneration Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision. Explicitly passing a revision is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision. No compiled kernel found. Compiling kernels : C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4-qe\quantization_kernels_parallel.c Compiling gcc -O3 -fPIC -pthread -fopenmp -std=c99 C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4-qe\quantization_kernels_parallel.c -shared -o C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4-qe\quantization_kernels_parallel.so 'gcc' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 Compile failed, using default cpu kernel code. Compiling gcc -O3 -fPIC -std=c99 C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4-qe\quantization_kernels.c -shared -o C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4-qe\quantization_kernels.so 'gcc' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 Kernels compiled : C:\Users\admin.cache\huggingface\modules\transformers_modules\chatglm-6b-int4-qe\quantization_kernels.so Cannot load cpu kernel, don't use quantized model on cpu. Using quantization cache Applying quantization to glm layers module transformers has no attribute TFChatGLMForConditionalGeneration

minlo-18 avatar Apr 18 '23 16:04 minlo-18

content/huawer.txt 未能成功加载 Traceback (most recent call last): File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\routes.py", line 394, in run_predict output = await app.get_blocks().process_api( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 1075, in process_api result = await self.call_function( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\gradio\blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio_backends_asyncio.py", line 937, in run_sync_in_worker_thread return await future ^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\anyio_backends_asyncio.py", line 867, in run result = context.run(func, *args) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\Desktop\LC2\langchain-ChatGLM-0.1.2\webui.py", line 82, in get_vector_store vs_path = local_doc_qa.init_knowledge_vector_store(["content/" + filepath]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\Desktop\LC2\langchain-ChatGLM-0.1.2\chains\local_doc_qa.py", line 80, in init_knowledge_vector_store vector_store = FAISS.from_documents(docs, self.embeddings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\vectorstores\base.py", line 218, in from_documents return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\vectorstores\faiss.py", line 368, in from_texts return cls.__from( ^^^^^^^^^^^ File "C:\Users\admin\AppData\Local\Programs\Python\Python311\Lib\site-packages\langchain\vectorstores\faiss.py", line 330, in __from index = faiss.IndexFlatL2(len(embeddings[0])) ~~~~~~~~~~^^^ IndexError: list index out of range

minlo-18 avatar Apr 18 '23 16:04 minlo-18

好多报错,都上传上来了,大佬有空看看,希望对项目有帮助 还是好希望什么时候能有个一键包啊,这些环境啊,依赖啊什么的都打包好QAQ 大佬辛苦了!

minlo-18 avatar Apr 18 '23 17:04 minlo-18

Same question

onesecurity avatar Apr 19 '23 13:04 onesecurity

可以离线安装 detectron2

git clone https://github.com/facebookresearch/detectron2.git
cd detectron2 && pip install -e .

EtachGu avatar Apr 22 '23 10:04 EtachGu

请更新到最新代码尝试

zRzRzRzRzRzRzR avatar Sep 27 '23 13:09 zRzRzRzRzRzRzR