python-3.x Pip无法为quickfix构建wheel-“Wno-deprecated”命令错误

qvtsj1bj  于 2023-08-08  发布在  Python
关注(0)|答案(2)|浏览(202)

我正在尝试在python 3.10上安装最新的quickfix包1.15.1。我收到以下错误:

(venv3.10) C:\Users\s\Downloads>py -m pip install quickfix                          
Collecting quickfix
  Using cached quickfix-1.15.1.tar.gz (1.5 MB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: quickfix
  Building wheel for quickfix (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      copying quickfix.py -> build\lib.win-amd64-3.10
      copying quickfixt11.py -> build\lib.win-amd64-3.10
      copying quickfix40.py -> build\lib.win-amd64-3.10
      copying quickfix41.py -> build\lib.win-amd64-3.10
      copying quickfix42.py -> build\lib.win-amd64-3.10
      copying quickfix43.py -> build\lib.win-amd64-3.10
      copying quickfix44.py -> build\lib.win-amd64-3.10
      copying quickfix50.py -> build\lib.win-amd64-3.10
      copying quickfix50sp1.py -> build\lib.win-amd64-3.10
      copying quickfix50sp2.py -> build\lib.win-amd64-3.10
      running build_ext
      Testing for std::tr1::shared_ptr...
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC++ -IC:\git
\etf\fi_etf\venv3.10\include -IC:\Users\s\AppData\Local\Programs\Python\Python310\include -IC:\Users\s\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\
Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "-IC:\Progra
m Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\incl
ude\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Wi
ndows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tptest_std_tr1_shared_ptr.cpp /Fotest_std_tr1_shared_ptr.obj
      test_std_tr1_shared_ptr.cpp
      test_std_tr1_shared_ptr.cpp(1): fatal error C1083: Cannot open include file: 'tr1/memory': No such file or directory
       ...not found
      Testing for std::shared_ptr...
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" -std=c++0x /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -IC
++ -IC:\git\etf\fi_etf\venv3.10\include -IC:\Users\s\AppData\Local\Programs\Python\Python310\include -IC:\Users\s\AppData\Local\Programs\Python\Python310\Include "-IC:\Program F
iles (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\ATLMFC\include" "
-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Ki
ts\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Fil
es (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tptest_std_shared_ptr.cpp /Fotest_std_shared_ptr.obj
      cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
      test_std_shared_ptr.cpp
      ...found
      Testing for std::unique_ptr...
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" -std=c++0x /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DH
AVE_STD_SHARED_PTR -IC++ -IC:\git\etf\fi_etf\venv3.10\include -IC:\Users\s\AppData\Local\Programs\Python\Python310\include -IC:\Users\s\AppData\Local\Programs\Python\Python310\I
nclude "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.3
2532\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program 
Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\wi
nrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /Tptest_std_unique_ptr.cpp /Fotest_std_unique
_ptr.obj
      cl : Command line warning D9002 : ignoring unknown option '-std=c++0x'
      test_std_unique_ptr.cpp
      ...found
      creating build\temp.win-amd64-3.10
      creating build\temp.win-amd64-3.10\Release
      creating build\temp.win-amd64-3.10\Release\C++
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DPYTHON_MAJOR_VERSION=3 -DHAVE_STD_SHA
RED_PTR -DHAVE_STD_UNIQUE_PTR -IC++ -IC:\git\etf\fi_etf\venv3.10\include -IC:\Users\s\AppData\Local\Programs\Python\Python310\include -IC:\Users\s\AppData\Local\Programs\Python\
Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.36.32532\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\M
SVC\14.36.32532\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-I
C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.
22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /EHsc /TpC++\Acceptor.cpp /Fobuild\temp.
win-amd64-3.10\Release\C++\Acceptor.obj -std=c++0x -Wno-deprecated -Wno-unused-variable -Wno-deprecated-declarations -Wno-maybe-uninitialized
      cl : Command line error D8021 : invalid numeric argument '/Wno-deprecated'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.36.32532\\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 quickfix
  Running setup.py clean for quickfix
Failed to build quickfix
ERROR: Could not build wheels for quickfix, which is required to install pyproject.toml-based projects

字符串
据我所知,库试图使用一个未被识别的“/Wno-deprecated”命令,但我不完全理解发生了什么,也不知道如何修复它。如果你能帮忙的话,我将不胜感激。

nkoocmlb

nkoocmlb1#

问题与pip无关。这可能与已弃用的代码有关。
该问题与'-Wno-deprecated-declaration'的用法有关,可以使用'-Wdeprecated-declaration'来修复。read this
你可以做上述更正,并按照上面提到的那样构建和安装它。在这里

9w11ddsr

9w11ddsr2#

问题与PIP无关。itl可能与弃用的代码有关,但我通常使用wtfix Python库而不是quickfix。

相关问题