英文:
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/.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论