Error occurs while using the db module in Python 3.x

Viewed 191

I'm making a game in python using pygame. I have installed dependencies such as Ship and db. However, while running the python file I'm getting the following error.

Traceback (most recent call last):
  File "a_invasion.py", line 5, in <module>
    from ship import Ship
  File "C:\ProgramData\Anaconda3\lib\site-packages\ship\__init__.py", line 4, in <module>
    import db, config, load
  File "C:\ProgramData\Anaconda3\lib\site-packages\db\__init__.py", line 69
    print "var", var
              ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("var", var)?
1 Answers

It may be some dependency conflicts. Check the Python version the libraries are using.

If I do print "ok", it works with Python 2 but Python 3.* will complaint:

print 'ok'
      ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('ok')?
Related