【发布时间】:2018-04-01 18:25:31
【问题描述】:
我在笔记本电脑上成功安装了nose并尝试运行nosestest。但是,终端提醒我: “bash:nosetests:找不到命令。”
奇怪的是,当我在终端中打开 Python 解释器并执行以下操作时:
import nose
nose.main()
我得到了预期的结果。
我尝试使用
find / -type f -name 'nosetests*' -perm +111 -print -quit
来自答案Installed Nose but cannot use on command line。但结果弹出为:
find: /.DocumentRevisions-V100: Permission denied
find: /.fseventsd: Permission denied
find: /.Spotlight-V100: Permission denied
find: /.Trashes: Permission denied
仅供参考,我正在按照“Learn Python the Hard Way”的步骤进行操作。
谢谢
【问题讨论】:
-
which nosetests会告诉你它是否在PATH -
泰。我试过了,但它没有返回任何结果
-
我没想到会这样。你是如何安装这个包的?
-
pip --version 是否返回一些东西?
-
感谢 stackoverflow.com/questions/32546228/… 于 2016 年 8 月 5 日 6:17 回复的回复。