1

我的系统上有 python 3.8。

我正在尝试使用 pip install annoy 安装 Annoy。

但我收到以下错误:

 ERROR: Command errored out with exit status 1:
   command: 'D:\Anaconda\envs\tensorflow_env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Faizan Hassan\\AppData\\Local\\Temp\\pip-install-_7d9h68q\\annoy\\setup.py'"'"'; __file__='"'"'C:\\Users\\Faizan Hassan\\AppData\\Local\\Temp\\pip-install-_7d9h68q\\annoy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\Faizan Hassan\AppData\Local\Temp\pip-wheel-acbt5gft'
       cwd: C:\Users\Faizan Hassan\AppData\Local\Temp\pip-install-_7d9h68q\annoy\
  Complete output (10 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.8
  creating build\lib.win-amd64-3.8\annoy
  copying annoy\__init__.py -> build\lib.win-amd64-3.8\annoy
  running build_ext
  building 'annoy.annoylib' extension
  error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
  ----------------------------------------
  ERROR: Failed building wheel for annoy
    ERROR: Command errored out with exit status 1:
     command: 'D:\Anaconda\envs\tensorflow_env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Faizan Hassan\\AppData\\Local\\Temp\\pip-install-_7d9h68q\\annoy\\setup.py'"'"'; __file__='"'"'C:\\Users\\Faizan Hassan\\AppData\\Local\\Temp\\pip-install-_7d9h68q\\annoy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Faizan Hassan\AppData\Local\Temp\pip-record-0m5sse9_\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Anaconda\envs\tensorflow_env\Include\annoy'
         cwd: C:\Users\Faizan Hassan\AppData\Local\Temp\pip-install-_7d9h68q\annoy\
    Complete output (10 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.8
    creating build\lib.win-amd64-3.8\annoy
    copying annoy\__init__.py -> build\lib.win-amd64-3.8\annoy
    running build_ext
    building 'annoy.annoylib' extension
    error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\Anaconda\envs\tensorflow_env\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Faizan Hassan\\AppData\\Local\\Temp\\pip-install-_7d9h68q\\annoy\\setup.py'"'"'; __file__='"'"'C:\\`enter code here`Users\\Faizan Hassan\\AppData\\Local\\Temp\\pip-install-_7d9h68q\\annoy\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Faizan Hassan\AppData\Local\Temp\pip-record-0m5sse9_\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\Anaconda\envs\tensorflow_env\Include\annoy' Check the logs for full command output.

我怎样才能摆脱这个错误?我试图在网上查看多个相关错误,但似乎没有任何帮助。

4

0 回答 0