强制Nosetests使用Python 2.7而不是3.4

dig*_*ers 6 python nosetests web.py python-2.7 python-3.x

我一直在使用3.4版学习Python.我最近开始学习Web.py所以一直在使用Python 2.7,因为Python 3.4不支持web.py.我为Python 3.4和2.7安装了鼻子1.3.4模块.我需要在使用Web.py模块的2.7中编写的一些Python代码上运行nosetests命令.但是,当我输入nosetests命令它会自动使用Python 3.4时,因为无法在我的Python代码中导入Web.py模块而引发错误.有没有办法强制测试使用Python 2.7?运行OS X Yosemite的Macbook Pro.

dig*_*ers 6

正如@dano在他的评论中所说:

尝试python2.7 -m nose而不是跑步nosetests.