Unknown error with running the nosetests from Learning Python the Hard Way Ex46
Question: I am working on [ex46](http://learnpythonthehardway.org/book/ex46.html) from
Learning Python the Hard way.

I first created tests/NAME_tests.py as the following:

    
    
    from nose.tools import *
    import NAME
    
    def setup():
        print "SETUP!"
    
    def teardown():
        print "TEAR DOWN!"
    
    def test_basic():
        print "I RAN!"
    

And then I ran `~/projects/skeleton $ nosetests`

However, I am getting the following error and I have no idea why there is a
missing parenthesis.

    
    
        print "SETUP!"
                     ^
    SyntaxError: Missing parentheses in call to 'print'
    

[![enter image description
here](http://i.stack.imgur.com/ybkYY.png)](http://i.stack.imgur.com/ybkYY.png)


Answer: You are using _Python 3.4_ as can be seen from the paths in the screenshot.

In Python 3.x , `print` is a function, not a statement. You should use it as a
function. Example -

    
    
    print("SETUP!")
    

Similarly for all prints .

The Example in [ex46](http://learnpythonthehardway.org/book/ex46.html) is most
probably written for Python 2 (In which `print` was a statement) .

