在virtualenv中使用鼻子的问题 [英] Problems using nose in a virtualenv

查看:71
本文介绍了在virtualenv中使用鼻子的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在virtualenv项目中使用过鼻子(nosetests)-它似乎找不到在virtualenv环境中安装的软件包.

I am unable to use nose (nosetests) in a virtualenv project - it can't seem to find the packages installed in the virtualenv environment.

奇怪的是我可以设定

test_suite = 'nose.collector'

在setup.py中运行测试,就和

in setup.py and run the tests just fine as

python setup.py test

但是在连续进行鼻子测试时,会出现各种各样的导入错误.

but when running nosetests straight, there are all sorts of import errors.

我已经在整个系统范围内安装了鼻子和一个virtualenv鼻子套件,但都没有运气.

I've tried it with both a system-wide installation of nose and a virtualenv nose package and no luck.

有什么想法吗?

谢谢!

推荐答案

您可以运行myenv/bin/python /usr/bin/nosetests吗?那应该使用虚拟环境的库集来运行Nose.

Are you able to run myenv/bin/python /usr/bin/nosetests? That should run Nose using the virtual environment's library set.

这篇关于在virtualenv中使用鼻子的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆