“ lru-dict的构建轮”和“ lru-dict的运行setup.py安装”错误

时间:2020-09-10 16:44:05

标签: python python-3.x dictionary terminal runtime-error

所以我试图通过Anaconda终端下载一个名为TextAttack的程序,该程序在Python上运行,并且不断收到有关“为lru-dict构建车轮(setup.py)...错误”和“正在运行setup.py install for lru-dict ...错误”。有人知道如何解决吗?

  Building wheels for collected packages: lru-dict
  Building wheel for lru-dict (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\mtecl\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\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\mtecl\AppData\Local\Temp\pip-wheel-fwm92t_z'
       cwd: C:\Users\mtecl\AppData\Local\Temp\pip-install-gc4f2zmf\lru-dict\
  Complete output (11 lines):
  running bdist_wheel
  running build
  running build_ext
  building 'lru' extension
  creating build
  creating build\temp.win-amd64-3.7
  creating build\temp.win-amd64-3.7\Release
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\mtecl\anaconda3\include -IC:\Users\mtecl\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tclru.c /Fobuild\temp.win-amd64-3.7\Release\lru.obj
  lru.c
  C:\Users\mtecl\anaconda3\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for lru-dict
  Running setup.py clean for lru-dict
Failed to build lru-dict
Installing collected packages: lru-dict, textattack
    Running setup.py install for lru-dict ... error
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\mtecl\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\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\mtecl\AppData\Local\Temp\pip-record-uhdfg09i\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\mtecl\anaconda3\Include\lru-dict'
         cwd: C:\Users\mtecl\AppData\Local\Temp\pip-install-gc4f2zmf\lru-dict\
    Complete output (11 lines):
    running install
    running build
    running build_ext
    building 'lru' extension
    creating build
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Users\mtecl\anaconda3\include -IC:\Users\mtecl\anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.25.28610\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tclru.c /Fobuild\temp.win-amd64-3.7\Release\lru.obj
    lru.c
    C:\Users\mtecl\anaconda3\include\pyconfig.h(59): fatal error C1083: Cannot open include file: 'io.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.25.28610\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\mtecl\anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\setup.py'"'"'; __file__='"'"'C:\\Users\\mtecl\\AppData\\Local\\Temp\\pip-install-gc4f2zmf\\lru-dict\\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\mtecl\AppData\Local\Temp\pip-record-uhdfg09i\install-record.txt' --single-version-externally-managed --compile --install-headers

谢谢