Loading

安装fasttext出错Building wheel for fasttext (pyproject.toml) ... error

(.venv) (base) PS D:\pycharm_project\rag-api\api> pip install fasttext==0.9.3
Collecting fasttext==0.9.3
  Using cached fasttext-0.9.3.tar.gz (73 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pybind11>=2.2 (from fasttext==0.9.3)
  Obtaining dependency information for pybind11>=2.2 from https://files.pythonhosted.org/packages/13/2f/0f24b288e2ce56f51c920137620b4434a38fd80583dbbe24fc2a1656c388/pybind11-2.13.6-py3-none-any.whl.metadata
  Using cached pybind11-2.13.6-py3-none-any.whl.metadata (9.5 kB)
Requirement already satisfied: setuptools>=0.7.0 in d:\pycharm_project\rag-api\api\.venv\lib\site-packages (from fasttext==0.9.3) (75.1.0)
Requirement already satisfied: numpy in d:\pycharm_project\rag-api\api\.venv\lib\site-packages (from fasttext==0.9.3) (1.26.4)
Using cached pybind11-2.13.6-py3-none-any.whl (243 kB)
Building wheels for collected packages: fasttext
  Building wheel for fasttext (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for fasttext (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [105 lines of output]
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packages\setuptools\dist.py:452: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!

              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.

              By 2024-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        opt = self.warn_dash_deprecation(opt, section)
      running bdist_wheel
      running build
      running build_py
      creating build\lib.win-amd64-cpython-311\fasttext
      copying python\fasttext_module\fasttext\FastText.py -> build\lib.win-amd64-cpython-311\fasttext
      copying python\fasttext_module\fasttext\__init__.py -> build\lib.win-amd64-cpython-311\fasttext
      creating build\lib.win-amd64-cpython-311\fasttext\util
      copying python\fasttext_module\fasttext\util\util.py -> build\lib.win-amd64-cpython-311\fasttext\util
      copying python\fasttext_module\fasttext\util\__init__.py -> build\lib.win-amd64-cpython-311\fasttext\util
      creating build\lib.win-amd64-cpython-311\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_configurations.py -> build\lib.win-amd64-cpython-311\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_script.py -> build\lib.win-amd64-cpython-311\fasttext\tests
      copying python\fasttext_module\fasttext\tests\__init__.py -> build\lib.win-amd64-cpython-311\fasttext\tests
      running build_ext
      building 'fasttext_pybind' extension
      creating build\temp.win-amd64-cpython-311\Release\python\fasttext_module\fasttext\pybind
      creating build\temp.win-amd64-cpython-311\Release\src
      "D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\txmmy\AppData
\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packages\pybind11\include -IC:\Users\txmmy\AppData\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packag
es\pybind11\include -Isrc -ID:\pycharm_project\rag-api\api\.venv\include -ID:\anaconda\include -ID:\anaconda\Include "-ID:\Visual Studio community 2022-17.0.5\i
de\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-ID:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include" "-IC:\Program Files (x86)\Windows 
Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\1
0.0.19041.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwin
rt" /EHsc /Tppython/fasttext_module/fasttext/pybind/fasttext_pybind.cc /Fobuild\temp.win-amd64-cpython-311\Release\python/fasttext_module/fasttext/pybind/fasttext_pybind.obj /EHsc /DVERSION_INFO=\\\"0.9.3\\\"
      fasttext_pybind.cc
      The contents of <string_view> are available only with C++17 or later.
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(40): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(40): error C4430: 缺少类型说明符 - 假定 为 int。注意: C++ 不支持默认 int
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(41): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(41): error C4430: 缺少类型说明符 - 假定 为 int。注意: C++ 不支持默认 int
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(46): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(46): error C4430: 缺少类型说明符 - 假定 为 int。注意: C++ 不支持默认 int
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(75): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(75): error C4430: 缺少类型说明符 - 假定 为 int。注意: C++ 不支持默认 int
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(76): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(76): error C4430: 缺少类型说明符 - 假定 为 int。注意: C++ 不支持默认 int
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(78): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(78): error C4430: 缺少类型说明符 - 假定 为 int。注意: C++ 不支持默认 int
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(78): error C2535: “fasttext::entry_type fasttext::Dictionary::getType(int32_t) const”: 已经定义或声明成员函数
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(77): note: 参见“fasttext::Dictionary::getType”的声明
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): error C4430: 缺少类型说明符 - 假定 为 int。注意: C++ 不支持默认 int
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): error C2146: 语法错误: 缺少“)”(在标符“str”的前面)
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): error C3646: “str”: 未知重写说明符 
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): error C2059: 语法错误:“)”
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): error C2143: 语法错误: 缺少“;”(在“const”的前面)
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): error C4430: 缺少类型说明符 - 假定 为 int。注意: C++ 不支持默认 int
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): error C2208: “const int”: 没有使用 此类型进行定义的成员
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): warning C4091: “ ”: 没有声明变量时 忽略“const int”的左侧
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(103): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(103): error C2061: 语法错误: 标识符“string_view”
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(71): error C2662: “uint32_t fasttext::Dictionary::hash(const int)”: 不能将“this”指针从“_Ty2”转换“fasttext::Dictionary &”
              with
              [
                  _Ty2=const fasttext::Dictionary
              ]
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(71): note: 转换丢失限定符
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(91): note: 参见“fasttext::Dictionary::hash”的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(72): error C2664: “int32_t fasttext::Dictionary::getId(const int,uint32_t) const”: 无法将参数 1 从“std::string”转换为“const int”
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(72): note: 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(76): note: 参见“fasttext::Dictionary::getId”的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(73): error C2664: “fasttext::entry_type fasttext::Dictionary::getType(int32_t) const”: 无法将参 数 1 从“std::string”转换为“int32_t”
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(73): note: 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符
      C:\Users\txmmy\AppData\Local\Temp\pip-install-dx8pvc1b\fasttext_84a022f0ca0d46f593f6efba131a66ab\src\dictionary.h(77): note: 参见“fasttext::Dictionary::getType”的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(172): error C2065: “ssize_t”: 未声明的标识符
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(172): error C2672: “pybind11::init”: 未找到匹配的重载函数
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2974: "pybind11::init": "CFunc" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1978): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2974: "pybind11::init": "Func" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1970): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2974: "pybind11::init": "Args" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1958): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(172): error C2672: “pybind11::class_<fasttext::Vector>::def”: 未找到匹配的重载函数
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2780: “pybind11::class_<fasttext::Vector> &pybind11::class_<fasttext::Vector>::def(const char *,Func &&,const Extra &...)”: 应输入 3 个参数,却提供了 1 个
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1620): note: 参见“pybind11::class_<fasttext::Vector>::def”的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(186): error C2065: “ssize_t”: 未声明的标识符
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(186): error C2065: “ssize_t”: 未声明的标识符
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(186): error C2672: “pybind11::init”: 未找到匹配的重载函数
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(183): error C2974: "pybind11::init": "CFunc" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1978): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(183): error C2974: "pybind11::init": "Func" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1970): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(183): error C2974: "pybind11::init": "Args" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-i5tmxclg\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1958): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(186): error C2672: “pybind11::class_<fasttext::DenseMatrix>::def”: 未找到匹配的重载函数
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(183): error C2780: “pybind11::class_<fasttext::DenseMatrix> &pybind11::class_<fasttext::DenseMatrix>::def(const char *,Func &&,const Extra &...)”: 应输入 3 个参数,却提供了 1 个
<fasttext::DenseMatrix>::def”的声明
      error: command 'D:\\Visual Studio community 2022-17.0.5\\ide\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fasttext
Failed to build fasttext
ERROR: Could not build wheels for fasttext, which is required to install pyproject.toml-based projects
[notice] To update, run: python.exe -m pip install --upgrade pip
(.venv) (base) PS D:\pycharm_project\rag-api\api> git clone https://github.com/facebookresearch/fastText.git
Cloning into 'fastText'...
remote: Enumerating objects: 3998, done.
remote: Counting objects: 100% (1026/1026), done.
remote: Compressing objects: 100% (195/195), done.
remote: Total 3998 (delta 890), reused 859 (delta 826), pack-reused 2972 (from 1)
Receiving objects: 100% (3998/3998), 8.30 MiB | 2.06 MiB/s, done.
Resolving deltas: 100% (2528/2528), done.
Updating files: 100% (520/520), done.
(.venv) (base) PS D:\pycharm_project\rag-api\api> cd fastText
(.venv) (base) PS D:\pycharm_project\rag-api\api\fastText> pip install .
Processing d:\pycharm_project\rag-api\api\fasttext
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pybind11>=2.2 (from fasttext==0.9.2)
  Obtaining dependency information for pybind11>=2.2 from https://files.pythonhosted.org/packages/13/2f/0f24b288e2ce56f51c920137620b4434a38fd80583dbbe24fc2a1656c388/pybind11-2.13.6-py3-none-any.whl.metadata
  Using cached pybind11-2.13.6-py3-none-any.whl.metadata (9.5 kB)
Requirement already satisfied: setuptools>=0.7.0 in d:\pycharm_project\rag-api\api\.venv\lib\site-packages (from fasttext==0.9.2) (75.1.0)
Requirement already satisfied: numpy in d:\pycharm_project\rag-api\api\.venv\lib\site-packages (from fasttext==0.9.2) (1.26.4)
Using cached pybind11-2.13.6-py3-none-any.whl (243 kB)
Building wheels for collected packages: fasttext
  Building wheel for fasttext (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for fasttext (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [105 lines of output]
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\setuptools\dist.py:452: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!

              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.

              By 2024-Sep-26, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        opt = self.warn_dash_deprecation(opt, section)
      running bdist_wheel
      running build
      running build_py
      creating build\lib.win-amd64-cpython-311\fasttext
      copying python\fasttext_module\fasttext\FastText.py -> build\lib.win-amd64-cpython-311\fasttext
      copying python\fasttext_module\fasttext\__init__.py -> build\lib.win-amd64-cpython-311\fasttext
      creating build\lib.win-amd64-cpython-311\fasttext\util
      copying python\fasttext_module\fasttext\util\util.py -> build\lib.win-amd64-cpython-311\fasttext\util
      copying python\fasttext_module\fasttext\util\__init__.py -> build\lib.win-amd64-cpython-311\fasttext\util
      creating build\lib.win-amd64-cpython-311\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_configurations.py -> build\lib.win-amd64-cpython-311\fasttext\tests
      copying python\fasttext_module\fasttext\tests\test_script.py -> build\lib.win-amd64-cpython-311\fasttext\tests
      copying python\fasttext_module\fasttext\tests\__init__.py -> build\lib.win-amd64-cpython-311\fasttext\tests
      running build_ext
      building 'fasttext_pybind' extension
      creating build\temp.win-amd64-cpython-311\Release\python\fasttext_module\fasttext\pybind
      creating build\temp.win-amd64-cpython-311\Release\src
      "D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\txmmy\AppData
\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\pybind11\include -IC:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packag
es\pybind11\include -Isrc -ID:\pycharm_project\rag-api\api\.venv\include -ID:\anaconda\include -ID:\anaconda\Include "-ID:\Visual Studio community 2022-17.0.5\i
de\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-ID:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include" "-IC:\Program Files (x86)\Windows 
Kits\10\include\10.0.19041.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\1
0.0.19041.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.19041.0\\cppwin
rt" /EHsc /Tppython/fasttext_module/fasttext/pybind/fasttext_pybind.cc /Fobuild\temp.win-amd64-cpython-311\Release\python/fasttext_module/fasttext/pybind/fasttext_pybind.obj /EHsc /DVERSION_INFO=\\\"0.9.2\\\"
      fasttext_pybind.cc
      The contents of <string_view> are available only with C++17 or later.
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(40): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(40): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(41): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(41): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(46): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(46): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(75): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(75): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(76): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(76): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(78): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(78): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(78): error C2535: “fasttext::entry_type fasttext::Dictionary::getType(int32_t) const”: 已经定义或明成员函数
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(77): note: 参见“fasttext::Dictionary::getType”的声明
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): error C2146: 语法错误: 缺少“)”(在标识符“str”的前面)
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): error C3646: “str”: 未知重写说明符
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): error C2059: 语法错误:“)”
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): error C2143: 语法错误: 缺少“;”(在“const”的前面)
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): error C2208: “const int”: 没有使用此类型进行定义的成员
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): warning C4091: “ ”: 没有声明变量时忽略“const int”的左侧
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(103): error C2039: "string_view": 不是 "std" 的成员
      D:\Visual Studio community 2022-17.0.5\ide\VC\Tools\MSVC\14.31.31103\include\unordered_map(24): note: 参见“std”的声明
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(103): error C2061: 语法错误: 标识符“string_view”
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(71): error C2662: “uint32_t fasttext::Dictionary::hash(const int)”: 不能将“this”指针从“_Ty2”转换“fasttext::Dictionary &”
              with
              [
                  _Ty2=const fasttext::Dictionary
              ]
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(71): note: 转换丢失限定符
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(91): note: 参见“fasttext::Dictionary::hash”的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(72): error C2664: “int32_t fasttext::Dictionary::getId(const int,uint32_t) const”: 无法将参数 1 从“std::string”转换为“const int”
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(72): note: 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(76): note: 参见“fasttext::Dictionary::getId”的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(73): error C2664: “fasttext::entry_type fasttext::Dictionary::getType(int32_t) const”: 无法将参 数 1 从“std::string”转换为“int32_t”
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(73): note: 没有可用于执行该转换的用户定义的转换运算符,或者无法调用该运算符
      D:\pycharm_project\rag-api\api\fastText\src\dictionary.h(77): note: 参见“fasttext::Dictionary::getType”的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(172): error C2065: “ssize_t”: 未声明的标识符
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(172): error C2672: “pybind11::init”: 未找到匹配的重载函数
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2974: "pybind11::init": "CFunc" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1978): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2974: "pybind11::init": "Func" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1970): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2974: "pybind11::init": "Args" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1958): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(172): error C2672: “pybind11::class_<fasttext::Vector>::def”: 未找到匹配的重载函数
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(171): error C2780: “pybind11::class_<fasttext::Vector> &pybind11::class_<fasttext::Vector>::def(const char *,Func &&,const Extra &...)”: 应输入 3 个参数,却提供了 1 个
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1620): note: 参见“pybind11::class_<fasttext::Vector>::def”的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(186): error C2065: “ssize_t”: 未声明的标识符
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(186): error C2065: “ssize_t”: 未声明的标识符
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(186): error C2672: “pybind11::init”: 未找到匹配的重载函数
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(183): error C2974: "pybind11::init": "CFunc" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1978): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(183): error C2974: "pybind11::init": "Func" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1970): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(183): error C2974: "pybind11::init": "Args" 的 模板 参数无效,应为类型
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1958): note: 参见“pybind11::init” 的声明
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(186): error C2672: “pybind11::class_<fasttext::DenseMatrix>::def”: 未找到匹配的重载函数
      python/fasttext_module/fasttext/pybind/fasttext_pybind.cc(183): error C2780: “pybind11::class_<fasttext::DenseMatrix> &pybind11::class_<fasttext::DenseMatrix>::def(const char *,Func &&,const Extra &...)”: 应输入 3 个参数,却提供了 1 个
      C:\Users\txmmy\AppData\Local\Temp\pip-build-env-g_11gn0i\overlay\Lib\site-packages\pybind11\include\pybind11\pybind11.h(1620): note: 参见“pybind11::class_<fasttext::DenseMatrix>::def”的声明
      error: command 'D:\\Visual Studio community 2022-17.0.5\\ide\\VC\\Tools\\MSVC\\14.31.31103\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for fasttext
Failed to build fasttext
ERROR: Could not build wheels for fasttext, which is required to install pyproject.toml-based projects

posted @ 2024-09-23 11:49  踩坑大王  阅读(142)  评论(0编辑  收藏  举报