Problems using nose in a virtualenv

后端 未结 8 1971
-上瘾入骨i
-上瘾入骨i 2020-12-24 04:57

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

The odd thing is that i ca

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-24 05:45

    You need to have a copy of nose installed in the virtual environment. In order to force installation of nose into the virtualenv, even though it is already installed in the global site-packages, run pip install with the -I flag:

    (env1)$ pip install nose -I
    

    From then on you can just run nosetests as usual.

提交回复
热议问题