Cannot install pip install -r requirements.txt in Python in Windows 10

huangapple go评论54阅读模式
英文:

Cannot install pip install -r requirements.txt in Python in Windows 10

问题

When trying to install the requirements.txt, I am getting this error below. I tried following the instructions and downloaded "Microsoft C++ Build Tools" from: https://visualstudio.microsoft.com/visual-cpp-build-tools

But this did not work. I also tried changing syntax in the terminal from:

pip install -r requirements.txt to
pip install [User] -r requirements.txt

But this did not work either.

Any ideas why this will not install.

Building wheels for collected packages: hnswlib
  Building wheel for hnswlib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for hnswlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'hnswlib' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for hnswlib
Failed to build hnswlib
ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects
英文:

When trying to install the requirements.txt I am getting this error below. I tried following the instructions and downloaded

"Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools

But this did not work. I also tried changing syntax in the terminal from:

pip install -r requirements.txt to
pip install [User] -r requirements.txt

But this did not work either.

Any ideas why this will not install.

Building wheels for collected packages: hnswlib
  Building wheel for hnswlib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for hnswlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [5 lines of output]
      running bdist_wheel
      running build
      running build_ext
      building 'hnswlib' extension
      error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for hnswlib
Failed to build hnswlib
ERROR: Could not build wheels for hnswlib, which is required to install pyproject.toml-based projects

答案1

得分: 1

你需要安装 Microsoft C++ Build Tools。您可以从此处下载并安装它们:https://visualstudio.microsoft.com/visual-cpp-build-tools/。

英文:

You need to install the Microsoft C++ Build Tools. You can download and install them from here: https://visualstudio.microsoft.com/visual-cpp-build-tools/.

huangapple
  • 本文由 发表于 2023年5月7日 14:19:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76192461.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定