Python 为翻译聊天机器人安装fastBPE包时出错

Python 为翻译聊天机器人安装fastBPE包时出错,python,intellij-idea,pip,translation,chatbot,Python,Intellij Idea,Pip,Translation,Chatbot,我正试图在github存储库的帮助下制作一个转换聊天机器人。第一步是安装fastBPE包。在终端中运行“pip install FASTBEP”命令时,出现以下错误: Building wheel for fastBPE (setup.py) ... error ERROR: Command errored out with exit status 1: command: 'c:\users\p.naik\appdata\local\programs\python\python36\p

我正试图在github存储库的帮助下制作一个转换聊天机器人。第一步是安装fastBPE包。在终端中运行“pip install FASTBEP”命令时,出现以下错误:

Building wheel for fastBPE (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\p.naik\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\P008C~1.NAI\\AppData\\Local\\Temp\\pip-install-0yvj6h1b\\fastbpe\\setup.py'"'"';
__file__='"'"'C:\\Users\\P008C~1.NAI\\AppData\\Local\\Temp\\pip-install-0yvj6h1b\\fastbpe\\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\P008C~1.NAI\AppData\Local\Temp\pip-wheel-qyhj1n0d'
       cwd: C:\Users\P008C~1.NAI\AppData\Local\Temp\pip-install-0yvj6h1b\fastbpe\
  Complete output (19 lines):
  running bdist_wheel
  running build
  running build_py
  package init file 'fastBPE\__init__.py' not found (or not a regular file)
  running build_ext
  building 'fastBPE' extension
  creating build
  creating build\temp.win-amd64-3.6
  creating build\temp.win-amd64-3.6\Release
  creating build\temp.win-amd64-3.6\Release\fastBPE
  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IfastBPE -Ic:\users\p.naik\appdata\local\programs\python\python36\include -Ic:\users\p.naik\appdata\local\programs\py
thon\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program F
iles (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /TpfastBPE/fastBPE.cpp /Fobuild\temp.win-amd64-3.6\Release\fastBPE/fastBPE.obj -std=c++11 -Ofast -pthread
  cl : Command line warning D9025 : overriding '/Os' with '/Ot'
  cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
  cl : Command line warning D9002 : ignoring unknown option '-Of'
  cl : Command line warning D9002 : ignoring unknown option '-Oa'
  cl : Command line warning D9002 : ignoring unknown option '-pthread'
  fastBPE.cpp
  c:\users\p.naik\appdata\local\temp\pip-install-0yvj6h1b\fastbpe\fastbpe\fastBPE.hpp(15): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
  ----------------------------------------
  ERROR: Failed building wheel for fastBPE
  Running setup.py clean for fastBPE
Failed to build fastBPE
Installing collected packages: fastBPE
    Running setup.py install for fastBPE ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\p.naik\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\P008C~1.NAI\\AppData\\Local\\Temp\\pip-install-0yvj6h1b\\fastbpe\\setup.py'"'"'
; __file__='"'"'C:\\Users\\P008C~1.NAI\\AppData\\Local\\Temp\\pip-install-0yvj6h1b\\fastbpe\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compil
e(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\P008C~1.NAI\AppData\Local\Temp\pip-record-t3cgh4en\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\p.naik\appdata\local\pro
grams\python\python36\Include\fastBPE'
         cwd: C:\Users\P008C~1.NAI\AppData\Local\Temp\pip-install-0yvj6h1b\fastbpe\
    Complete output (19 lines):
    running install
    running build
    running build_py
    package init file 'fastBPE\__init__.py' not found (or not a regular file)
    running build_ext
    building 'fastBPE' extension
    creating build
    creating build\temp.win-amd64-3.6
    creating build\temp.win-amd64-3.6\Release
    creating build\temp.win-amd64-3.6\Release\fastBPE
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IfastBPE -Ic:\users\p.naik\appdata\local\programs\python\python36\include -Ic:\users\p.naik\appdata\local\programs\
python\python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program
 Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /TpfastBPE/fastBPE.cpp /Fobuild\temp.win-amd64-3.6\Release\fastBPE/fastBPE.obj -std=c++11 -Ofast -pthread
    cl : Command line warning D9025 : overriding '/Os' with '/Ot'
    cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
    cl : Command line warning D9002 : ignoring unknown option '-Of'
    cl : Command line warning D9002 : ignoring unknown option '-Oa'
    cl : Command line warning D9002 : ignoring unknown option '-pthread'
    fastBPE.cpp
    c:\users\p.naik\appdata\local\temp\pip-install-0yvj6h1b\fastbpe\fastbpe\fastBPE.hpp(15): fatal error C1083: Cannot open include file: 'sys/mman.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\p.naik\appdata\local\programs\python\python36\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\P008C~1.NAI\\AppData\\Local\\Temp\\pip-install
-0yvj6h1b\\fastbpe\\setup.py'"'"'; __file__='"'"'C:\\Users\\P008C~1.NAI\\AppData\\Local\\Temp\\pip-install-0yvj6h1b\\fastbpe\\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\P008C~1.NAI\AppData\Local\Temp\pip-record-t3cgh4en\install-record.txt' --single-version-externally-managed --compile --install-headers '
c:\users\p.naik\appdata\local\programs\python\python36\Include\fastBPE' Check the logs for full command output.

我尝试了很多事情,但每次尝试都会导致不同的错误。这是我的第一个聊天机器人项目。提前谢谢

据我所知,它并不是真正为windows设计的。您可以按照本文的说明手动安装它。https://github.com/pytorch/fairseq/issues/1224