использование назначенных инициализаторов требует как минимум '/std:c++20' и не может смешивать назначенные инициализаторы с неназначенными инициализаторами.

Я хочу установить repast4py в Windows 10, и я ввожу «pip install repast4py» в cmd, но он отображает ошибки «src/repast4py/coremodule.cpp(342): ошибка C7556: невозможно смешивать назначенные инициализаторы с неназначенными инициализаторами ' и 'ошибка C7555: для использования назначенных инициализаторов требуется как минимум '/std:c++20'. После этого я обновляю свои инструменты сборки Visual Studio до 2022, но все же отображается та же ошибка. пожалуйста, помогите мне. Спасибо

      C:\Users\H.Zibaei>pip install repast4py
Collecting repast4py
  Using cached repast4py-1.0.5b1.tar.gz (79 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting torch
  Using cached torch-1.13.1-cp39-cp39-win_amd64.whl (162.5 MB)
Collecting Cython
  Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Requirement already satisfied: mpi4py in c:\users\h.zibaei\appdata\local\programs\python\python39\lib\site-packages (from repast4py) (3.1.4)
Collecting numba
  Using cached numba-0.56.4-cp39-cp39-win_amd64.whl (2.5 MB)
Collecting networkx>=2.6.2
  Using cached networkx-2.8.8-py3-none-any.whl (2.0 MB)
Collecting pyyaml
  Using cached PyYAML-6.0-cp39-cp39-win_amd64.whl (151 kB)
Collecting numpy>=1.18.0
  Using cached numpy-1.24.1-cp39-cp39-win_amd64.whl (14.9 MB)
Collecting llvmlite<0.40,>=0.39.0dev0
  Using cached llvmlite-0.39.1-cp39-cp39-win_amd64.whl (23.2 MB)
Collecting numpy>=1.18.0
  Using cached numpy-1.23.5-cp39-cp39-win_amd64.whl (14.7 MB)
Requirement already satisfied: setuptools in c:\users\h.zibaei\appdata\local\programs\python\python39\lib\site-packages (from numba->repast4py) (58.1.0)
Collecting typing-extensions
  Using cached typing_extensions-4.4.0-py3-none-any.whl (26 kB)
Building wheels for collected packages: repast4py
  Building wheel for repast4py (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for repast4py (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [30 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-39
      creating build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\context.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\core.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\geometry.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\logging.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\network.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\parameters.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\random.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\schedule.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\space.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\util.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\value_layer.py -> build\lib.win-amd64-cpython-39\repast4py
      copying src\repast4py\__init__.py -> build\lib.win-amd64-cpython-39\repast4py
      running build_ext
      building 'repast4py._core' extension
      creating build\temp.win-amd64-cpython-39
      creating build\temp.win-amd64-cpython-39\Release
      creating build\temp.win-amd64-cpython-39\Release\src
      creating build\temp.win-amd64-cpython-39\Release\src\repast4py
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\H.Zibaei\AppData\Local\Temp\pip-build-env-vr63vhus\overlay\Lib\site-packages\numpy\core\include -IC:\Users\H.Zibaei\AppData\Local\Temp\pip-build-env-vr63vhus\overlay\Lib\site-packages\mpi4py\include -IC:\Users\H.Zibaei\AppData\Local\Programs\Python\Python39\include -IC:\Users\H.Zibaei\AppData\Local\Programs\Python\Python39\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\cppwinrt" /EHsc /Tpsrc/repast4py/coremodule.cpp /Fobuild\temp.win-amd64-cpython-39\Release\src/repast4py/coremodule.obj -std=c++11
      cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
      coremodule.cpp
      src/repast4py/coremodule.cpp(342): error C7556: cannot mix designated-initializers with non-designated-initializers
      src/repast4py/coremodule.cpp(343): error C7555: use of designated initializers requires at least '/std:c++20'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\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 repast4py
Failed to build repast4py
ERROR: Could not build wheels for repast4py, which is required to install pyproject.toml-based projects

Обновление: python 3.9.12 visual studio 2022 pip 22.3.1 колесо 0.38.4 установить pyproject.toml

0 ответов

Другие вопросы по тегам