简体   繁体   English

由于 VS 构建工具,在 python 3.10 上安装 Hydra 失败

[英]Hydra install on python 3.10 fails due to VS build tools

I'm trying to install Hydra 2.5 on a Windows 10 system.我正在尝试在 Windows 10 系统上安装 Hydra 2.5。 I have Visual Studio Build Tools 2022 installed with the desktop C++ development option.我安装了 Visual Studio Build Tools 2022 和桌面 C++ 开发选项。 When I use pip I get the error attached below.当我使用 pip 时,我收到下面附上的错误。 I've tried it with both python 3.10 and 3.9.我已经用 python 3.10 和 3.9 都试过了。 I've tried a fresh conda environment.我尝试了一个新的 conda 环境。 I've also tried to install Mingw-w64 to see if that might help but it didn't help.我也尝试安装 Mingw-w64 看看是否有帮助,但没有帮助。 Any suggestions would be appreciated.任何建议,将不胜感激。

Building wheels for collected packages: hfcnn, hydra
  Building wheel for hfcnn (setup.py) ... done
  Created wheel for hfcnn: filename=hfcnn-0.1.0-py2.py3-none-any.whl size=42563 sha256=6eddd284ff183a321cd329928f9d3c242253072b854502a6df97de9b413edc69
  Stored in directory: C:\Users\natep\AppData\Local\Temp\pip-ephem-wheel-cache-w1fs1loj\wheels\24\17\50\c13d5e23193f95d3a4a29906052d1bfec09abb75cf58968c32
  Building wheel for hydra (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [39 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      copying src\hydra.py -> build\lib.win-amd64-3.10
      running build_ext
      building '_hydra' extension
      creating build\temp.win-amd64-3.10
      creating build\temp.win-amd64-3.10\Release
      creating build\temp.win-amd64-3.10\Release\src
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\natep\AppData\Local\Temp\pip-install-k0ndin1s\hydra_a0d7e613ec4f4a2091c58d266385d27f\src -IC:\Users\natep\anaconda3\envs\hfcnn\include -IC:\Users\natep\anaconda3\envs\hfcnn\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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\10.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\\cppwinrt" /Tcsrc/MurmurHash3.c /Fobuild\temp.win-amd64-3.10\Release\src/MurmurHash3.obj -std=gnu99 -O2 -D_LARGEFILE64_SOURCE
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      MurmurHash3.c
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\natep\AppData\Local\Temp\pip-install-k0ndin1s\hydra_a0d7e613ec4f4a2091c58d266385d27f\src -IC:\Users\natep\anaconda3\envs\hfcnn\include -IC:\Users\natep\anaconda3\envs\hfcnn\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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\10.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\\cppwinrt" /Tcsrc/_hydra.c /Fobuild\temp.win-amd64-3.10\Release\src/_hydra.obj -std=gnu99 -O2 -D_LARGEFILE64_SOURCE
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      _hydra.c
      src/_hydra.c(1621): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      src/_hydra.c(2668): warning C4267: '=': conversion from 'size_t' to 'char', possible loss of data
      src/_hydra.c(3377): warning C4018: '<': signed/unsigned mismatch
      src/_hydra.c(6964): warning C4244: 'function': conversion from 'unsigned __int64' to 'unsigned long', possible loss of data
      src/_hydra.c(7072): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      src/_hydra.c(7103): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      src/_hydra.c(7316): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data
      src/_hydra.c(7445): error C2105: '++' needs l-value
      src/_hydra.c(7447): error C2105: '--' needs l-value
      src/_hydra.c(8530): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\natep\anaconda3\envs\hfcnn\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src/_hydra.c(8535): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\natep\anaconda3\envs\hfcnn\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src/_hydra.c(8539): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\natep\anaconda3\envs\hfcnn\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src/_hydra.c(8551): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\natep\anaconda3\envs\hfcnn\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src/_hydra.c(9924): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      src/_hydra.c(9940): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      src/_hydra.c(11521): warning C4996: 'PyCFunction_Call': deprecated in 3.9
      src/_hydra.c(11586): warning C4996: 'PyCFunction_Call': deprecated in 3.9
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\\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 hydra
  Running setup.py clean for hydra
Successfully built hfcnn
Failed to build hydra
Installing collected packages: hydra, funcy, dictdiffer, commonmark, billiard, appdirs, zipp, zc.lockfile, xmltodict, websocket-client, waitress, vine, urllib3, typing-extensions, torchinfo, tomlkit, toml, tensorboard-data-server, tabulate, sqlparse, sniffio, smmap, six, shtab, shortuuid, ruamel.yaml.clib, rsa, pyyaml, python-slugify, pypiwin32, pyparsing, pyjwt, pygments, pycparser, pyasn1-modules, psutil, protobuf, prompt-toolkit, prometheus-client, pillow, pathspec, oauthlib, numpy, networkx, multidict, MarkupSafe, markdown, kiwisolver, itsdangerous, idna, h11, greenlet, future, ftfy, fsspec, frozenlist, fonttools, entrypoints, dvc-render, dpath, distro, diskcache, dill, cycler, colorama, cloudpickle, charset-normalizer, cachetools, attrs, atpublic, async-timeout, absl-py, yarl, werkzeug, tqdm, torch, sqlalchemy, scipy, ruamel.yaml, rich, requests, querystring-parser, python-dateutil, pydot, packaging, Mako, Jinja2, importlib-metadata, grpcio, grandalf, google-auth, gitdb, flufl.lock, flatten-dict, dulwich, configobj, click, cffi, anyio, amqp, aiosignal, torchvision, requests-oauthlib, python-benedict, pygit2, pandas, matplotlib, kombu, hyperopt, httpcore, gitpython, Flask, dvclive, dvc-objects, docker, databricks-cli, cryptography, click-repl, click-plugins, click-didyoumean, alembic, aiohttp, rna, prometheus-flask-exporter, pandarallel, httpx, google-auth-oauthlib, dvc-data, celery, asyncssh, aiohttp-retry, webdav4, tensorboard, scmrepo, mlflow, dvc-task, dvc, hfcnn
  Running setup.py install for hydra ... error
  error: subprocess-exited-with-error

  × Running setup.py install for hydra did not run successfully.
  │ exit code: 1
  ╰─> [41 lines of output]
      running install
      C:\Users\natep\anaconda3\envs\hfcnn\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      copying src\hydra.py -> build\lib.win-amd64-3.10
      running build_ext
      building '_hydra' extension
      creating build\temp.win-amd64-3.10
      creating build\temp.win-amd64-3.10\Release
      creating build\temp.win-amd64-3.10\Release\src
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\natep\AppData\Local\Temp\pip-install-k0ndin1s\hydra_a0d7e613ec4f4a2091c58d266385d27f\src -IC:\Users\natep\anaconda3\envs\hfcnn\include -IC:\Users\natep\anaconda3\envs\hfcnn\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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\10.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\\cppwinrt" /Tcsrc/MurmurHash3.c /Fobuild\temp.win-amd64-3.10\Release\src/MurmurHash3.obj -std=gnu99 -O2 -D_LARGEFILE64_SOURCE
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      MurmurHash3.c
      "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\natep\AppData\Local\Temp\pip-install-k0ndin1s\hydra_a0d7e613ec4f4a2091c58d266385d27f\src -IC:\Users\natep\anaconda3\envs\hfcnn\include -IC:\Users\natep\anaconda3\envs\hfcnn\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.32.31326\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" "-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\10.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\\cppwinrt" /Tcsrc/_hydra.c /Fobuild\temp.win-amd64-3.10\Release\src/_hydra.obj -std=gnu99 -O2 -D_LARGEFILE64_SOURCE
      cl : Command line warning D9002 : ignoring unknown option '-std=gnu99'
      _hydra.c
      src/_hydra.c(1621): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      src/_hydra.c(2668): warning C4267: '=': conversion from 'size_t' to 'char', possible loss of data
      src/_hydra.c(3377): warning C4018: '<': signed/unsigned mismatch
      src/_hydra.c(6964): warning C4244: 'function': conversion from 'unsigned __int64' to 'unsigned long', possible loss of data
      src/_hydra.c(7072): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      src/_hydra.c(7103): warning C4244: 'function': conversion from 'Py_ssize_t' to 'int', possible loss of data
      src/_hydra.c(7316): warning C4267: 'function': conversion from 'size_t' to 'unsigned int', possible loss of data
      src/_hydra.c(7445): error C2105: '++' needs l-value
      src/_hydra.c(7447): error C2105: '--' needs l-value
      src/_hydra.c(8530): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\natep\anaconda3\envs\hfcnn\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src/_hydra.c(8535): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\natep\anaconda3\envs\hfcnn\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src/_hydra.c(8539): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\natep\anaconda3\envs\hfcnn\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src/_hydra.c(8551): error C2039: 'tp_print': is not a member of '_typeobject'
      C:\Users\natep\anaconda3\envs\hfcnn\include\cpython/object.h(191): note: see declaration of '_typeobject'
      src/_hydra.c(9924): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      src/_hydra.c(9940): warning C4996: '_PyUnicode_get_wstr_length': deprecated in 3.3
      src/_hydra.c(11521): warning C4996: 'PyCFunction_Call': deprecated in 3.9
      src/_hydra.c(11586): warning C4996: 'PyCFunction_Call': deprecated in 3.9
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.32.31326\\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: legacy-install-failure

× Encountered error while trying to install package.
╰─> hydra

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

The package name is hydra-core:). package 名称是 hydra-core:)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM