python-3.x 警告C4996:“Py_OptimizeFlag ':在3.12 aiohttp/_WebSocket.c中已弃用(3042):错误C2039:”ob_digit“:不是”_longobject“的成员

nimxete2  于 2023-11-20  发布在  Python
关注(0)|答案(1)|浏览(282)

我是新手。
我一直在尝试将openai库安装到python中,但我一直遇到问题。我已经安装了C++库。
它似乎有问题,具体与aio http,我得到下面的错误。我a运行的Windows 11笔记本电脑没有管理员的限制。

错误

"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\sande\AppData\Local\Programs\Python\Python312\include -IC:\Users\sande\AppData\Local\Programs\Python\Python312\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\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" /Tcaiohttp/_websocket.c /Fobuild\temp.win-amd64-cpython-312\Release\aiohttp/_websocket.obj
      _websocket.c
      aiohttp/_websocket.c(1475): warning C4996: 'Py_OptimizeFlag': deprecated in 3.12
      aiohttp/_websocket.c(3042): error C2039: 'ob_digit': is not a member of '_longobject'

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for aiohttp

Failed to build aiohttp

ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects

字符串

dbf7pr2w

dbf7pr2w1#

两种解决方案:
或者使用python 3.11

pip install aiohttp==3.9.0b0

字符串
安装当前支持python 3.12.x的beta版本
然后尝试openai安装
链接到git:https://github.com/KillianLucas/open-interpreter/issues/581

相关问题