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

安装pycocotools失败,找了好多方法都不能解决。

Open prtsc88 opened this issue 1 year ago • 5 comments

问题描述 / Problem Description 用简洁明了的语言描述这个问题 / Describe the problem in a clear and concise manner.

复现问题的步骤 / Steps to Reproduce

  1. 执行 '...' / Run '...'
  2. 点击 '...' / Click '...'
  3. 滚动到 '...' / Scroll to '...'
  4. 问题出现 / Problem occurs

Building wheels for collected packages: pycocotools Building wheel for pycocotools (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for pycocotools (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [16 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-310 creating build\lib.win-amd64-cpython-310\pycocotools copying pycocotools\coco.py -> build\lib.win-amd64-cpython-310\pycocotools copying pycocotools\cocoeval.py -> build\lib.win-amd64-cpython-310\pycocotools copying pycocotools\mask.py -> build\lib.win-amd64-cpython-310\pycocotools copying pycocotools_init_.py -> build\lib.win-amd64-cpython-310\pycocotools running build_ext cythoning pycocotools/_mask.pyx to pycocotools_mask.c C:\Users**\AppData\Local\Temp\pip-build-env-q0g6nh_t\overlay\Lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: C:\Users\hu\AppData\Local\Temp\pip-install-mnrep7bo\pycocotools_bb88702cea394d878a4aabc954fdefe1\pycocotools_mask.pyx tree = Parsing.p_module(s, pxd, full_module_name) building 'pycocotools._mask' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [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 pycocotools ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects (.venv) PS H:\chatglm\langchain>

VC2022我也安装了,

prtsc88 avatar May 10 '23 01:05 prtsc88

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output]

你装的VS2022吧?2022好像不行,而且VS也不需要装全 只装2015的C++的build tools就行, 看这个装一下 https://zhuanlan.zhihu.com/p/471661231

zfanswer avatar May 11 '23 06:05 zfanswer

https://www.bilibili.com/video/BV1tf4y1t7ru/?spm_id_from=333.337.search-card.all.click&vd_source=68157616f86bd3a5b0a7584f03f35435 这个的评论区有解决方法

xiufanivan avatar May 13 '23 12:05 xiufanivan

谢谢,已解决。win下安装成功

在 2023-05-11 14:43:59,"Fan" @.***> 写道:

error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output]

你装的VS2022吧?2022好像不行,而且VS也不需要装全 只装2015的C++的build tools就行, 看这个装一下 https://zhuanlan.zhihu.com/p/471661231

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

prtsc88 avatar May 15 '23 08:05 prtsc88

conda install -c conda-forge pycocotools 遇到同样的问题,用conda安装pycocotools解决了,conda安装完之后重新pip install -r requirements.txt

sdaaron avatar May 17 '23 10:05 sdaaron

谢谢,已从win11换到VM Ubuntu了。已解决。

在 2023-05-17 18:23:56,"sida233" @.***> 写道:

conda install -c conda-forge pycocotools 遇到同样的问题,用conda安装pycocotools解决了,conda安装完之后重新pip install -r requirements.txt

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

prtsc88 avatar Jun 01 '23 06:06 prtsc88

conda install -c conda-forge pycocotools 遇到同样的问题,用conda安装pycocotools解决了,conda安装完之后重新pip install -r requirements.txt

正解!

yanqswhu avatar Jun 27 '23 04:06 yanqswhu