Force nose2 to use Python 2.7 instead of Python 3.5
问题 Similar to Force Nosetests to Use Python 2.7 instead of 3.4, I've written some unit tests in Python 2 which I'd like to run in Python 2. However, by default my installation of nose2 seems to try to run Python 3. For example, if I try to run unittest_controller.py I get output ending with Ran 4 tests in 1.552s OK whereas if I use the command nose2 from the same directory, I get ImportError: No module named 'StringIO' ---------------------------------------------------------------------- Ran 2