首页 > 其他分享 >安装fasttext出错Building wheel for fasttext (pyproject.toml) ... error

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

时间:2024-09-23 11:46:08浏览次数:11  
标签:Building wheel fasttext module api pybind11 error pybind

(.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

标签:Building,wheel,fasttext,module,api,pybind11,error,pybind
From: https://www.cnblogs.com/Gimm/p/18426802

相关文章

  • ERROR: Failed to build installable wheels for some pyproject.toml based projects
    问题描述安装fastembed包的时候发现在PyStemmer这一步的时候报错:Buildingwheelsforcollectedpackages:PyStemmerBuildingwheelforPyStemmer(setup.py)...errorerror:subprocess-exited-with-error×pythonsetup.pybdist_wheeldidnotrunsucce......
  • Building Dynamic Memory Allocators
    OutlineDuedate:13September2024,23:59Markweighting:20%ubmission:SubmityourassignmentthroughGitLab(fullinstructionsbelow)Policies:Forlatepolicies,plagiarismpolicies,etc.,seethepoliciespageTimeleft5:03:12:58DaysHrsMinsSecswa......
  • 解决auditwheel repair过程rpath被修改的问题
    问题背景AuditWheel是一个用于修复Python的whl包的工具,例如在这个CyFES开源库中,因为使用到了Cython和CUDA编译动态链接库的技术,方便Python调用。但是在编译CUDA算子时如果使用到了运行时库,那么在第一步构建whl包的时候不会自动包含运行时库,而第二步使用auditwheel进行whl包修复的......
  • TimeWheel算法介绍及在应用上的探索
    作者:来自vivo互联网服务器团队-LiFan本文从追溯时间轮算法的出现,介绍了时间轮算法未出现前,基于队列的定时任务实现,以及基于队列的定时任务实现所存在的缺陷。接着我们介绍了时间轮算法的算法思想及其数据结构,详细阐述了三种时间轮模型的数据结构和优劣性。再次,我们介绍时......
  • P4655 [CEOI2017] Building Bridges
    题意思路设\(sum_i=\sum\limits_{j=1}^iw_j\)。可以得到转移方程\(f_i=f_j+(h_i-h_j)^2+sum_i-sum_j\)。转化为\(y=kx+b\)的形式:\(f_i=f_j+(h_i-h_j)^2+sum_i-sum_j=f_j+h_i^2+h_j^2-2h_ih_j+sum_i-sum_j=(-2h_ih_j)+......
  • [ARC062E] Building Cubes with AtCoDeer
    题意给定\(n\)个正方形,每个正方形的四个角有颜色,有方向。你需要选出\(6\)个正方形,拼出一个正方体,使得角上的颜色相同。问有多少种方案。\(n\le400,m\le1000\)Sol注意到若确定了对着的两个面,就可以确定正方体上所有面的颜色。因此考虑枚举两个面,计算出\(8\)个角......
  • SSUD71-101 Understanding Buildings 241
    SSUD71-101Understanding Buildings241:Assignment2Topic: Assignment2:Group project requiring application ofconstructionprocesses/methods.Format:Part 1:Siteand HouseSummaryPart2: Detailed RoomConstructionSchedulePart3:Construction......
  • Building a Car Rental Website
    WebApplicationDevelopment:BuildingaCarRentalWebsiteSummer2024AllocationThiscourseworkisworth100%ofthemarksformoduleYouwillalsoneedskillsfromthefollowingmodules:(PythonProgramming)(Designreporting)(Databasedesign)(Secu......
  • 无法在 python 中安装 pip install expliot - bluepy 的 Building Wheel (pyproject.t
    在此处输入图像描述当我尝试在Windows计算机中通过cmd安装pipinstallexpliot包时,我收到2个错误名称×Buildingwheelforbluepy(pyproject.toml)didnotrunsuccessfully.│exitcode:1**AND**opt=self.warn_dash_deprecation......
  • Fortune Wheel - Problem
    FortuneWheel-Problem题目大意有一个上有编号\(0\)到\(n-1\)的转盘,你可以使转盘随机旋转到一个位置或者向前旋转\(k_i\)个位置,求在最优策略下的期望步数。数据范围满足,\(1\len\le10^5,\lvertk\rvert\le500\)。思路考虑先使用bfs,在\(O(n\lvertk\rvert)\)的......