首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Rasa堆栈中,在mitie安装过程中,属性错误、文件找不到错误和其他错误。

在Rasa堆栈中,在mitie安装过程中,属性错误、文件找不到错误和其他错误。
EN

Stack Overflow用户
提问于 2020-02-06 09:58:09
回答 1查看 259关注 0票数 0

( C:\Users\qwerty\Bankbot\rasa>pip )安装mitie收集mitie使用缓存的https://files.pythonhosted.org/packages/80/e9/4481c5e6233b8b93acccaacf595bc8e11f40d6ac2e6f6e70b7a62693f9ea/mitie-0.7.36.tar.gz建筑车轮收集软件包: mitie建筑车轮为mitie (setup.py)。从命令c:\users\qwerty\bankbot\venv\scripts\python.exe -u -c“,tokenize;file='C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py';f=getattr(tokenize,'open',open)(file);code=f.read().replace('\r\n',‘\n’);f.close()中输出错误;(编译(代码,文件,'exec'))“bdist_wheel -d -d--python cp37:运行bdist_wheel运行构建跟踪(最近一次调用):文件"C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py",第44行,在get_cmake_version out = subprocess.check_output('cmake',‘-版本’)文件"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\subprocess.py",第395行,在check_output **kwargs中).stdout File "C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\subprocess.py",第472行,以Popen(*popenargs,**kwargs)作为进程:"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\subprocess.py",第775行,在init restore_signals,start_new_session) File restore_signals 1178中,在_execute_child startupinfo) FileNotFoundError: WinError 2中,系统找不到指定的文件

在处理上述异常的过程中,发生了另一个异常:

追溯(最近一次调用):文件"",第1行,在文件"C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py",第67行,在‘编程语言::Python ::3.5',文件"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\core.py",第148行,在安装程序()文件"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py",第966行中,在run_commands self.run_command(cmd)文件"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py",行985中,在"C:\Users\qwerty\AppData\Roaming\Python\Python37\site-packages\wheel\bdist_wheel.py",cmd_obj.run() run_command cmd_obj.run第223行中,在运行self.run_command('build')文件"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py",第313行中,在"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py",self.distribution.run_command(命令) run_command self.distribution.run_command第985行中,在run_command cmd_obj.run() File "C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py",第16行中,在运行if "C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py",(self.get_cmake_version())< '3.1.0':文件LooseVersion第47行,在get_cmake_version中,在".join(e.name for e in self.extensions)“中)文件"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py",第103行,在getattr AttributeError(attr) AttributeError中:扩展

失败的建筑车轮为mitie运行setup.py干净为mitie未能建立mitie安装收集包: mitie运行setup.py安装为mitie .从命令c:\users\qwerty\bankbot\venv\scripts\python.exe -u -c“,tokenize;file='C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py';f=getattr(tokenize,'open',open)(file);code=f.read().replace('\r\n',‘\n’);f.close()中输出错误;编译(代码,文件,))“安装-记录C:\Users\qwerty\AppData\Local\Temp\pip-record-qzh_imsa\install-record.txt --单版本-外部管理-编译-安装- c:\users\qwerty\bankbot\venv\include\site\python3.7\mitie:运行安装运行构建跟踪(最近一次调用):文件"C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py",行44,在"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\subprocess.py",文件的get_cmake_version out = subprocess.check_output('cmake',‘-version’)文件第395行中,在check_output **kwargs中,.stdout File "C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\subprocess.py",第472行与Popen(*popenargs )一起运行,**kwargs)作为进程:文件"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\subprocess.py",行775,init restore_signals,start_new_session)文件"C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\subprocess.py",行1178,_execute_child startupinfo) FileNotFoundError: WinError 2系统找不到指定的文件

代码语言:javascript
复制
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py", line 67, in <module>
    'Programming Language :: Python :: 3.5',
  File "C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\qwerty\bankbot\venv\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py", line 16, in run
    if LooseVersion(self.get_cmake_version()) < '3.1.0':
  File "C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py", line 47, in get_cmake_version
    ", ".join(e.name for e in self.extensions))
  File "C:\Users\qwerty\AppData\Local\Programs\Python\Python37\lib\distutils\cmd.py", line 103, in __getattr__
    raise AttributeError(attr)
AttributeError: extensions

----------------------------------------

命令"c:\users\qwerty\bankbot\venv\scripts\python.exe -u -c“导入setuptools,tokenize;file='C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\setup.py';f=getattr(tokenize,'open',open)(file);code=f.read().replace('\r\n','\n');f.close();(编译(代码,文件,'exec'))“安装-记录C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\ -单版本-外部管理-编译-安装标题c:\users\qwerty\bankbot\venv\include\site\python3.7\mitie”失败,错误代码1在C:\Users\qwerty\AppData\Local\Temp\pip-install-pfcl6b4q\mitie\中。

EN

回答 1

Stack Overflow用户

发布于 2020-02-07 20:45:27

因为您用rasa标记了它,所以我想您正在尝试在rasa中使用MITIE。

这些是要采取的步骤。我把它放在Ubuntu上的一个干净的小型conda环境中使用:

代码语言:javascript
复制
(base) $ conda create --name test-mitie-install python=3.7
(base) $ conda activate test-mitie-install
(test-mitie-install) $ pip install git+https://github.com/mit-nlp/MITIE.git
(test-mitie-install) $ pip install rasa[mitie]

在此之后,您仍然必须下载MITIE模型,如rasa.com上的rasa文档所述。

我从您的日志中确实看到,它是从缓存的副本中安装的:

代码语言:javascript
复制
...Collecting mitie Using cached...

如果这里描述的安装不适合您,请使用pip install --no-cache-dir ....

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60092205

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档