简体   繁体   English

无法在 Spyder 上使用行为运行功能文件

[英]Unable to run feature files using behave on Spyder

When I try step three of below tutorial: https://behave.readthedocs.io/en/latest/tutorial.html当我尝试以下教程的第三步时: https : //behave.readthedocs.io/en/latest/tutorial.html

"Run behave" 《奔跑吧》

Using terminal on vscode: I just type " behave " and my feature files run properly.在 vscode 上使用终端:我只需输入“ behave ”,我的功能文件就可以正常运行。 However, when I use iPython console on Spyder, getting below error-但是,当我在 Spyder 上使用 iPython 控制台时,出现以下错误-

  File "<ipython-input-20-35bd367acbcb>", line 1, in <module>
    behave

NameError: name 'behave' is not defined

Is it something to do with the python interpreter being used?这与正在使用的python解释器有关吗? Also features file are run easily on Pycharm.特性文件也可以在 Pycharm 上轻松运行。 Then why not Spyder?那为什么不是Spyder呢?

behave is not a python command, it's a terminal (bash) command.行为不是python命令,它是终端(bash)命令。 IPython is a python terminal- meaning it will run python code not bash commands IPython 是一个 python 终端——意味着它将运行 python 代码而不是 bash 命令

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM