libmagic 不可用,但有助于对类文件对象进行文件类型检测

问题描述 投票:0回答:1

我在 IDLE 中编写代码。我想通过 UnstructedURLLoader 访问数据,但我不断收到错误。

from langchain_community.document_loaders import UnstructuredURLLoader
from langchain_community.document_loaders import UnstructuredURLLoader
urls = [
    "https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-8-2023",
    "https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023",
]
loader = UnstructuredURLLoader(urls=urls)
data = loader.load()

错误是-

libmagic is unavailable but assists in filetype detection on file-like objects. Please consider installing libmagic for better results.
Error fetching or processing https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-8-2023, exception: Invalid file. The FileType.UNK file type is not supported in partition.
libmagic is unavailable but assists in filetype detection on file-like objects. Please consider installing libmagic for better results.
Error fetching or processing https://www.understandingwar.org/backgrounder/russian-offensive-campaign-assessment-february-9-2023, exception: Invalid file. The FileType.UNK file type is not supported in partition.

我也跟进了这个解决方案 -> UnstructedURLLoader 无法看到 libmagic 但又出现错误。

当我尝试

pip install libmagic
我收到错误 -

C:\Users\91783>pip install python-libmagic
Defaulting to user installation because normal site-packages is not writeable
Collecting python-libmagic
  Downloading python-libmagic-0.4.0.tar.gz (3.6 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting cffi==1.7.0 (from python-libmagic)
  Downloading cffi-1.7.0.tar.gz (400 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 400.3/400.3 kB 2.3 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pycparser (from cffi==1.7.0->python-libmagic)
  Downloading pycparser-2.21-py2.py3-none-any.whl.metadata (1.1 kB)
Downloading pycparser-2.21-py2.py3-none-any.whl (118 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 118.7/118.7 kB ? eta 0:00:00
Building wheels for collected packages: python-libmagic, cffi
  Building wheel for python-libmagic (pyproject.toml) ... done
  Created wheel for python-libmagic: filename=python_libmagic-0.4.0-py3-none-any.whl size=4118 sha256=7d4a067a629302bb6b1f70a524e89759f2b4f814c7420b81e3dcc649516863c4
  Stored in directory: c:\users\91783\appdata\local\pip\cache\wheels\fb\97\af\e63471763178fecbba59de7350c7c8c4967d07c4144caac20b
  Building wheel for cffi (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for cffi (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [215 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-312
      creating build\lib.win-amd64-cpython-312\cffi
      copying cffi\api.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\backend_ctypes.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\cffi_opcode.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\commontypes.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\cparser.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\ffiplatform.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\lock.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\model.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\recompiler.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\setuptools_ext.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\vengine_cpy.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\vengine_gen.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\verifier.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\__init__.py -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\_cffi_include.h -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\parse_c_type.h -> build\lib.win-amd64-cpython-312\cffi
      copying cffi\_embedding.h -> build\lib.win-amd64-cpython-312\cffi
      running build_ext
      building '_cffi_backend' extension
      creating build\temp.win-amd64-cpython-312
      creating build\temp.win-amd64-cpython-312\Release
      creating build\temp.win-amd64-cpython-312\Release\c
      creating build\temp.win-amd64-cpython-312\Release\c\libffi_msvc
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ic/libffi_msvc "-IC:\Program Files\Python312\include" "-IC:\Program Files\Python312\Include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcc/_cffi_backend.c /Fobuild\temp.win-amd64-cpython-312\Release\c/_cffi_backend.obj
      _cffi_backend.c
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\minibuffer.h(66): warning C4996: 'PyObject_AsReadBuffer': deprecated in 3.0
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\file_emulator.h(54): warning C4090: '=': different 'const' qualifiers
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\wchar_helper.h(83): warning C4013: 'PyUnicode_AS_UNICODE' undefined; assuming extern returning int
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\wchar_helper.h(84): warning C4013: 'PyUnicode_GET_SIZE' undefined; assuming extern returning int
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\wchar_helper.h(83): warning C4047: 'initializing': 'Py_UNICODE *' differs in levels of indirection from 'int'
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\wchar_helper.h(118): warning C4047: 'initializing': 'Py_UNICODE *' differs in levels of indirection from 'int'
      c/_cffi_backend.c(315): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
      c/_cffi_backend.c(316): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
      c/_cffi_backend.c(352): error C2106: '=': left operand must be l-value
      c/_cffi_backend.c(355): error C2106: '=': left operand must be l-value
      c/_cffi_backend.c(938): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(947): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(957): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(993): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1007): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1385): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1386): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1388): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1398): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1399): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1401): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1420): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1515): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1517): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1537): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1540): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1865): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1870): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1884): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1933): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(1987): warning C4244: 'return': conversion from 'Py_hash_t' to 'long', possible loss of data
      c/_cffi_backend.c(3264): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(3358): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(3458): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(3649): warning C4996: 'Py_FileSystemDefaultEncoding': deprecated in 3.12
      c/_cffi_backend.c(3792): error C2061: syntax error: identifier 'ssize_t'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_c'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_s'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_i'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_l'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ll'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_sc'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_uc'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_us'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ui'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ul'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ull'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_f'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_d'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ld'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_wc'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_b'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_i8'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_u8'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_i16'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_u16'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_i32'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_u32'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_i64'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_u64'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_il8'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ul8'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_il16'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ul16'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_il32'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ul32'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_il64'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ul64'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_if8'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_uf8'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_if16'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_uf16'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_if32'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_uf32'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_if64'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_uf64'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ip'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_up'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_im'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_um'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_pd'
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_sz'
      c/_cffi_backend.c(3804): error C2065: 'ssize_t': undeclared identifier
      c/_cffi_backend.c(3804): error C2037: left of 'y' specifies undefined struct/union 'aligncheck_ssz'
      c/_cffi_backend.c(3815): error C2059: syntax error: 'for'
      c/_cffi_backend.c(3815): error C2143: syntax error: missing '{' before '++'
      c/_cffi_backend.c(3815): error C2059: syntax error: '++'
      c/_cffi_backend.c(3815): error C2059: syntax error: ')'
      c/_cffi_backend.c(3829): error C2059: syntax error: 'if'
      c/_cffi_backend.c(3838): error C2059: syntax error: 'else'
      c/_cffi_backend.c(3855): error C2059: syntax error: 'else'
      c/_cffi_backend.c(3865): error C2099: initializer is not a constant
      c/_cffi_backend.c(3866): error C2040: 'td': 'int' differs in levels of indirection from 'CTypeDescrObject *'
      c/_cffi_backend.c(3867): error C2059: syntax error: 'if'
      c/_cffi_backend.c(3870): error C2143: syntax error: missing ')' before '->'
      c/_cffi_backend.c(3870): error C2143: syntax error: missing '{' before '->'
      c/_cffi_backend.c(3870): error C2059: syntax error: '->'
      c/_cffi_backend.c(3870): error C2059: syntax error: ')'
      c/_cffi_backend.c(3871): error C2143: syntax error: missing '{' before '->'
      c/_cffi_backend.c(3871): error C2059: syntax error: '->'
      c/_cffi_backend.c(3872): error C2143: syntax error: missing '{' before '->'
      c/_cffi_backend.c(3872): error C2059: syntax error: '->'
      c/_cffi_backend.c(3873): error C2143: syntax error: missing '{' before '->'
      c/_cffi_backend.c(3873): error C2059: syntax error: '->'
      c/_cffi_backend.c(3874): error C2143: syntax error: missing '{' before '->'
      c/_cffi_backend.c(3874): error C2059: syntax error: '->'
      c/_cffi_backend.c(3875): error C2059: syntax error: 'if'
      c/_cffi_backend.c(3879): error C2059: syntax error: 'else'
      c/_cffi_backend.c(3883): error C2143: syntax error: missing '{' before '->'
      c/_cffi_backend.c(3883): error C2059: syntax error: '->'
      c/_cffi_backend.c(3884): error C2040: 'unique_key': 'int [0]' differs in levels of indirection from 'const void *[1]'
      c/_cffi_backend.c(3885): error C2059: syntax error: 'return'
      c/_cffi_backend.c(3887): error C2143: syntax error: missing '{' before ':'
      c/_cffi_backend.c(3887): error C2059: syntax error: ':'
      c/_cffi_backend.c(3892): error C2059: syntax error: 'return'
      c/_cffi_backend.c(3893): error C2059: syntax error: '}'
      c/_cffi_backend.c(4027): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
      c/_cffi_backend.c(4018): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
      c/_cffi_backend.c(4039): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
      c/_cffi_backend.c(4251): warning C4013: 'PyUnicode_GetSize' undefined; assuming extern returning int
      c/_cffi_backend.c(4384): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(4425): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(4433): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(4627): warning C4244: '=': conversion from 'Py_ssize_t' to 'unsigned short', possible loss of data
      c/_cffi_backend.c(4742): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
      c/_cffi_backend.c(4746): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(4762): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
      c/_cffi_backend.c(4775): warning C4267: 'function': conversion from 'size_t' to 'int', possible loss of data
      c/_cffi_backend.c(4804): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(4854): warning C4244: 'function': conversion from 'Py_ssize_t' to 'unsigned int', possible loss of data
      c/_cffi_backend.c(4939): warning C4244: 'function': conversion from 'Py_ssize_t' to 'long', possible loss of data
      c/_cffi_backend.c(5214): warning C4996: 'PyEval_InitThreads': deprecated in 3.9
      c/_cffi_backend.c(5364): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
      c/_cffi_backend.c(5475): error C2065: 'ssize_t': undeclared identifier
      c/_cffi_backend.c(5475): error C2146: syntax error: missing ';' before identifier 'index'
      c/_cffi_backend.c(5475): error C2065: 'index': undeclared identifier
      c/_cffi_backend.c(5475): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      c/_cffi_backend.c(5476): error C2065: 'index': undeclared identifier
      c/_cffi_backend.c(5490): error C2065: 'index': undeclared identifier
      c/_cffi_backend.c(5491): error C2065: 'index': undeclared identifier
      c/_cffi_backend.c(6427): error C2065: 'b_new_primitive_type': undeclared identifier
      c/_cffi_backend.c(6425): error C2099: initializer is not a constant
      c/_cffi_backend.c(6427): warning C4047: 'initializing': 'PyCFunction' differs in levels of indirection from 'int'
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\parse_c_type.c(217): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\parse_c_type.c(286): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\parse_c_type.c(340): warning C4244: '=': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\parse_c_type.c(444): warning C4244: 'return': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\realize_c_type.c(425): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\realize_c_type.c(430): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\realize_c_type.c(448): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\realize_c_type.c(460): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\realize_c_type.c(559): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\realize_c_type.c(621): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\realize_c_type.c(670): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\realize_c_type.c(723): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\ffi_obj.c(191): warning C4090: 'initializing': different 'const' qualifiers
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\lib_obj.c(126): warning C4244: 'initializing': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\lib_obj.c(129): warning C4090: 'initializing': different 'const' qualifiers
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\lib_obj.c(298): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\lib_obj.c(342): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\lib_obj.c(368): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\lib_obj.c(389): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\lib_obj.c(403): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\lib_obj.c(208): warning C4090: 'initializing': different 'const' qualifiers
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\lib_obj.c(506): warning C4090: '=': different 'const' qualifiers
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(54): warning C4996: 'Py_FileSystemDefaultEncoding': deprecated in 3.12
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(190): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(235): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(267): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(268): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(280): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(281): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(301): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(321): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(322): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(327): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(347): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\cdlopen.c(351): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\call_python.c(20): error C2037: left of 'builtins' specifies undefined struct/union '_is'
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\call_python.c(73): warning C4090: '=': different 'const' qualifiers
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\call_python.c(90): warning C4244: 'function': conversion from 'intptr_t' to 'int', possible loss of data
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\call_python.c(160): error C2037: left of 'modules' specifies undefined struct/union '_is'
      C:\Users\91783\AppData\Local\Temp\pip-install-mmkaawti\cffi_e0cc08400b1f4290808401657b0630d1\c\call_python.c(235): error C2037: left of 'modules' specifies undefined struct/union '_is'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\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 cffi
Successfully built python-libmagic
Failed to build cffi
ERROR: Could not build wheels for cffi, which is required to install pyproject.toml-based projects


如何使用 UnstructedURLLoader ?

python machine-learning artificial-intelligence langchain python-wheel
1个回答
0
投票

我看到同样的错误消息,我尝试了多种解决方案,但没有任何效果

© www.soinside.com 2019 - 2024. All rights reserved.